Template:LocaleDate/styles.css: Difference between revisions

variables do not seem to work here in any browser but Firefox, so revert to explicit values which will be overridden in JS
(changed separators to variables, cleaned up markup, disabled unwanted markup and added some inline docs)
(variables do not seem to work here in any browser but Firefox, so revert to explicit values which will be overridden in JS)
Tag: Manual revert
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Source: https://stackoverflow.com/questions/29359486/use-css-to-format-date-time-or-percent-value */
/* Source: https://stackoverflow.com/questions/29359486/use-css-to-format-date-time-or-percent-value */


:root /* These variables are here to be changed by JavaScript code in MediaWiki:Common.js */
/* These variables are here to be changed by JavaScript code in MediaWiki:Common.js */
:root
{
{
   --day-order:2;
   --day-order:2;
   --month-order:1;
   --month-order:1;
  --day-before:"/";
  --month-before:""; /* use "\00a0" for a non-breaking space */
}
}


Line 29: Line 28:


/* Add separators */
/* Add separators */
.date-day::before  {content:var(--day-before);}
.date-day::before  {content:"/";}
.date-month::before{content:var(--month-before);}
.date-month::before{content:"\00a0";} /* \00a0 is a non-breaking space */
.date-year::before {content:"/";} /* or ", " for long format */
.date-year::before {content:"/";} /* or ", " for long format */