Skip to content

Commit b60b172

Browse files
Components lists (#21)
* Styles list * Add styles to checklists * fix identation
1 parent 629253a commit b60b172

File tree

2 files changed

+69
-9
lines changed

2 files changed

+69
-9
lines changed

src/css/doc.css

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@
251251
.doc .paragraph,
252252
.doc .dlist,
253253
.doc .hdlist,
254+
.doc .qlist,
254255
.doc .olist,
255256
.doc .ulist,
256257
.doc .exampleblock,
@@ -268,6 +269,12 @@
268269
margin: calc(24 / var(--rem-base) * 1rem) 0 0;
269270
}
270271

272+
.doc .ulist .paragraph,
273+
.doc .dlist .paragraph,
274+
.doc .hdlist .paragraph {
275+
margin: 0;
276+
}
277+
271278
.doc table.tableblock {
272279
font-size: calc(14.5 / var(--rem-base) * 1rem);
273280
}
@@ -629,20 +636,36 @@
629636
padding-left: var(--ds-space-2h);
630637
}
631638

639+
.doc ul.checklist p {
640+
padding: var(--ds-space-h) 0;
641+
}
642+
632643
.doc ul.checklist p > i.fa-check-square-o:first-child,
633644
.doc ul.checklist p > i.fa-square-o:first-child {
634645
display: inline-flex;
635646
justify-content: center;
636-
width: 1.25rem;
637-
margin-left: -1.25rem;
647+
align-items: center;
648+
vertical-align: middle;
649+
line-height: calc(16 / var(--rem-base) * 1rem);
650+
}
651+
652+
.doc ul.checklist i.fa-check-square-o::before,
653+
.doc ul.checklist i.fa-square-o::before {
654+
font-family: "Material Icons Outlined", sans-serif;
655+
border-radius: calc(3 / var(--rem-base) * 1rem);
656+
width: calc(16 / var(--rem-base) * 1rem);
657+
height: calc(16 / var(--rem-base) * 1rem);
638658
}
639659

640660
.doc ul.checklist i.fa-check-square-o::before {
641-
content: "\2713";
661+
content: "\e876";
662+
color: var(--ds-primary-solid-color);
663+
background-color: var(--ds-primary-solid-bg);
642664
}
643665

644666
.doc ul.checklist i.fa-square-o::before {
645-
content: "\274f";
667+
content: "";
668+
border: 0.25rem solid var(--ds-text-primary);
646669
}
647670

648671
.doc .dlist .dlist,
@@ -654,12 +677,12 @@
654677
.doc .ulist .dlist,
655678
.doc .ulist .olist,
656679
.doc .ulist .ulist {
657-
margin-top: var(--ds-space-1);
680+
margin-top: 0;
658681
}
659682

660683
.doc .olist li + li,
661684
.doc .ulist li + li {
662-
margin-top: var(--ds-space-2);
685+
margin-top: 0;
663686
}
664687

665688
.doc .ulist .listingblock,
@@ -695,9 +718,9 @@
695718

696719
.doc .ulist .title,
697720
.doc .olist .title {
698-
font-style: var(--caption-font-style);
699721
font-weight: var(--caption-font-weight);
700-
margin-bottom: var(--ds-space-h);
722+
margin-bottom: var(--ds-space-3);
723+
color: var(--heading-font-color);
701724
}
702725

703726
.doc .imageblock .title {
@@ -914,7 +937,7 @@
914937
}
915938

916939
.doc .dlist dt {
917-
font-style: italic;
940+
color: var(--heading-font-color);
918941
}
919942

920943
.doc .dlist dd {
@@ -939,6 +962,7 @@
939962
.doc td.hdlist1 {
940963
font-weight: var(--body-font-weight-bold);
941964
padding-right: 0.25rem;
965+
color: var(--heading-font-color);
942966
}
943967

944968
.doc td.hdlist2 {
@@ -1066,6 +1090,38 @@
10661090
word-wrap: normal;
10671091
}
10681092

1093+
.doc .checklist input[type="checkbox" i] {
1094+
appearance: none;
1095+
vertical-align: middle;
1096+
position: relative;
1097+
border-radius: calc(3 / var(--rem-base) * 1rem);
1098+
border: 0.25rem solid var(--ds-text-primary);
1099+
width: calc(16 / var(--rem-base) * 1rem);
1100+
height: calc(16 / var(--rem-base) * 1rem);
1101+
}
1102+
1103+
.doc .checklist input[type="checkbox" i]:checked {
1104+
border-color: var(--ds-primary-solid-bg);
1105+
}
1106+
1107+
.doc .checklist input[type="checkbox" i]::before {
1108+
font-family: "Material Icons Outlined", sans-serif;
1109+
content: "\e876";
1110+
position: absolute;
1111+
top: 50%;
1112+
left: 50%;
1113+
transform: translate(-50%, -50%);
1114+
opacity: 0;
1115+
}
1116+
1117+
.doc .checklist input[type="checkbox" i]:checked::before {
1118+
opacity: 1;
1119+
font-size: calc(16 / var(--rem-base) * 1rem);
1120+
color: var(--ds-primary-solid-color);
1121+
background-color: var(--ds-primary-solid-bg);
1122+
border-radius: calc(3 / var(--rem-base) * 1rem);
1123+
}
1124+
10691125
#footnotes {
10701126
font-size: 0.85em;
10711127
line-height: 1.5;

src/css/ds-layout.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ html[data-theme="dark"] .doc .landing-card-icon {
180180
margin-top: var(--ds-space-2);
181181
}
182182

183+
.doc .admonitionblock td.content .ulist p {
184+
margin-top: 0;
185+
}
186+
183187
.doc .admonitionblock td.content > .paragraph:first-child p:first-child,
184188
.doc .admonitionblock td.content > .title {
185189
margin: 0;

0 commit comments

Comments
 (0)