Template:LocaleDate/styles.css: Difference between revisions

m
+cat
(changed separators to variables, cleaned up markup, disabled unwanted markup and added some inline docs)
m (+cat)
 
(10 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 */


Line 86: Line 85:
.date-year[val="1998"]:after{content:"'98";}
.date-year[val="1998"]:after{content:"'98";}
.date-year[val="1999"]:after{content:"'99";}*/
.date-year[val="1999"]:after{content:"'99";}*/
/*[[Category:Message box templates]]*/