Skip to content
Snippets Groups Projects
Commit 2b44ce0b authored by Eric Bremner's avatar Eric Bremner
Browse files

Merge branch 'feature/ISTWCMS-5664-m26lebla-fix-nested-lists' into '1.0.x'

ISTWCMS-5664: css to reset and allow for correct display of nested lists

See merge request !44
parents 6fd459c8 e5f0c542
No related branches found
No related tags found
1 merge request!44ISTWCMS-5664: css to reset and allow for correct display of nested lists
// @file // @file
// Ordered list styles. // Ordered list styles.
ol{
:where(ol) {
padding-inline-start: var(--size-4); padding-inline-start: var(--size-4);
margin: 0 0 var(--size-2); margin: 0 0 var(--size-2);
ol{ &.lower-alpha {
list-style-type: lower-alpha;
margin: (var(--size-2) / 2) 0 0;
li ol {
list-style-type: lower-roman;
}
}
}
.lower-alpha {
list-style-type: lower-alpha;
li ol {
list-style-type: lower-alpha; list-style-type: lower-alpha;
} }
} &.upper-alpha{
.upper-alpha{
list-style-type: upper-alpha;
li ol {
list-style-type: upper-alpha; list-style-type: upper-alpha;
} }
} &.lower-roman {
.lower-roman {
list-style-type: lower-roman;
li ol {
list-style-type: lower-roman; list-style-type: lower-roman;
} }
} &.upper-roman{
.upper-roman{
list-style-type: upper-roman;
li ol {
list-style-type: upper-roman; list-style-type: upper-roman;
} }
} &.decimal {
.decimal { list-style: decimal outside none;
list-style: decimal outside none; margin: 0;
margin: 0; padding: 0 0 var(--size-2) var(--size-2);
padding: 0 0 var(--size-2) var(--size-2);
li { li {
counter-increment: item; list-style-type: decimal;
display: table; counter-increment: item;
margin: var(--size-1) 0; display: table;
margin: var(--size-1) 0;
&::before { &::before {
content: counters(item, ".") ". "; content: counters(item, ".") ". ";
display: table-cell; display: table-cell;
padding-right: 0.6rem; padding-right: 0.6rem;
} }
li { li {
margin: 0.5rem 0; margin: 0.5rem 0;
li::before { li::before {
content: counters(item, ".") " "; content: counters(item, ".") " ";
}
} }
}
ol { ol {
counter-reset: item; counter-reset: item;
list-style: square outside none; list-style: square outside none;
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
}
} }
} }
} }
//:where(ol) {
// padding-inline-start: var(--size-4);
// margin: 0 0 var(--size-2);
// ol{
// list-style-type: lower-alpha;
// margin: (var(--size-2) / 2) 0 0;
// li ol {
// list-style-type: lower-roman;
// }
// }
//}
//
//.lower-alpha {
// list-style-type: lower-alpha;
// li ol {
// list-style-type: lower-alpha;
// }
//}
//.upper-alpha{
// list-style-type: upper-alpha;
// li ol {
// list-style-type: upper-alpha;
// }
//}
//.lower-roman {
// list-style-type: lower-roman;
// li ol {
// list-style-type: lower-roman;
// }
//}
//.upper-roman{
// list-style-type: upper-roman;
// li ol {
// list-style-type: upper-roman;
// }
//}
//.decimal {
// list-style: decimal outside none;
// margin: 0;
// padding: 0 0 var(--size-2) var(--size-2);
//
// li {
// counter-increment: item;
// display: table;
// margin: var(--size-1) 0;
//
// &::before {
// content: counters(item, ".") ". ";
// display: table-cell;
// padding-right: 0.6rem;
// }
//
// li {
// margin: 0.5rem 0;
//
// li::before {
// content: counters(item, ".") " ";
// }
// }
//
// ol {
// counter-reset: item;
// list-style: square outside none;
// list-style-type: none;
// margin: 0;
// padding: 0;
// }
// }
//}
// @file // @file
// Unordered list styles. // Unordered list styles.
ul {
:where(ul) {
list-style-type: disc;
margin: 0 0 var(--size-2); margin: 0 0 var(--size-2);
padding: 0 0 0 var(--size-4); // LTR padding: 0 0 0 var(--size-3);
ul { ul{
list-style-type: circle;
margin: (var(--size-2) / 2) 0 0; margin: (var(--size-2) / 2) 0 0;
li > ul {
list-style-type: disc;
}
} }
} &.disc {
.disc {
list-style: disc;
ul {
list-style-type: disc; list-style-type: disc;
li > ul {
list-style-type: disc;
}
} }
} &.square {
.square {
list-style: square;
ul {
list-style-type: square; list-style-type: square;
li > ul {
list-style-type: square;
}
} }
} &.circle {
.circle {
list-style-type: circle;
ul {
list-style-type: circle; list-style-type: circle;
li > ul {
list-style-type: circle;
}
} }
} }
//
//:where(ul) {
// list-style-type: disc;
// margin: 0 0 var(--size-2);
// padding: 0 0 0 var(--size-4); // LTR
// ul {
// list-style-type: circle;
// margin: (var(--size-2) / 2) 0 0;
// li > ul {
// list-style-type: disc;
// }
// }
//}
//.disc {
// list-style: disc;
// ul {
// list-style-type: disc;
// li > ul {
// list-style-type: disc;
// }
// }
//}
//.square {
// list-style: square;
// ul {
// list-style-type: square;
// li > ul {
// list-style-type: square;
// }
// }
//}
//.circle {
// list-style-type: circle;
// ul {
// list-style-type: circle;
// li > ul {
// list-style-type: circle;
// }
// }
//}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment