MediaWiki:Common.css: Difference between revisions

From SCA Lochac
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:


body {
body {
   counter-reset: h2Counter h3Counter h4Counter;
   counter-reset: h2Counter h3Counter h4Counter tableCounter;
}
}


Line 62: Line 62:
}
}


table+caption {
  counter-increment: tableCounter;
}


table+caption::before {
table+caption::before {
   content: counter(page) "." counter(h2Counter) "." counter(h3Counter) " ";
   content: "Table ".counter(page) "." counter(tableCounter);
}
}



Revision as of 10:01, 6 July 2019

/* CSS placed here will be applied to all skins */
/* section-based ol numbering*/

body {
  counter-reset: h2Counter h3Counter h4Counter tableCounter;
}

.rulesNumbering h2 {
  counter-reset: h3Counter h4Counter;
  counter-increment: h2Counter;
}
.rulesNumbering h2:before {
  content: counter(page) "." counter(h2Counter) " ";
}

/* this is required to stop the 'contents' heading in the ToC from becoming '1 contents' */
#toctitle h2 {
counter-increment: none;
}
#toctitle h2:before {
  content: none;
}

.rulesNumbering h3 {
  counter-reset: h4Counter;
  counter-increment: h3Counter;
}
.rulesNumbering h3:before {
  content: counter(page) "." counter(h2Counter) "." counter(h3Counter) " ";
}

.rulesNumbering h4 {
  counter-increment: h4Counter;
}
.rulesNumbering h4:before {
  content: counter(page) "." counter(h2Counter) "." counter(h3Counter) "." counter(h4Counter) " ";
}

/* styling for ordered lists */
.rulesNumbering ol {
  list-style-type: decimal;
}

.rulesNumbering ol>li>ol{
  list-style-type: lower-alpha;
}
.rulesNumbering ol>li>ol>li>ol{
  list-style-type: lower-roman;
}

.rulesNumbering ul{
  text-indent: 0px;
  list-style-type: circle;
}
.rulesNumbering ul>li>ul {
  text-indent: 0px;
  list-style-type: circle;
}
.rulesNumbering ul>li>ul>li>ul {
  text-indent: 0px;
  list-style-type: circle;
}

table+caption {
  counter-increment: tableCounter;
}

table+caption::before {
  content: "Table ".counter(page) "." counter(tableCounter);
}


/* Giving table borders */
table.withBorders {
  border-collapse: collapse;
}
.withBorders, .withBorders th, .withBorders td {
  border: 2px solid black;
}

/* hide toolbox initially */
div#p-tb {
  visibility: hidden;
}