Skip to content

Commit a10e8da

Browse files
authored
Update custom.css to offer a Material Design theme (#308)
2 parents 9b44678 + 4536a13 commit a10e8da

3 files changed

Lines changed: 751 additions & 21 deletions

File tree

css/common-bootstrap.css

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@
44
*/
55

66
:root {
7-
--dita-prussian-blue: #1d365d;
8-
--dita-maroon: #800000;
7+
--dita-prussian-blue: var(--bs-primary-text-emphasis);
8+
--dita-maroon: var(--bs-danger-text-emphasis);
99
--dita-violet: var(--bs-purple);
1010
}
1111

1212
.list-group-item.active,
1313
.nav-link.active,
1414
[data-bs-theme='dark'] {
15-
--dita-prussian-blue: #6a91cf;
1615
--dita-violet: #cc99cd;
17-
--dita-maroon: #ff7676;
1816
}
1917

2018
.list-group-item {
@@ -48,14 +46,10 @@
4846

4947
@media (prefers-color-scheme: dark) {
5048
:root {
51-
--dita-prussian-blue: #6a91cf;
5249
--dita-violet: #cc99cd;
53-
--dita-maroon: #ff7676;
5450
}
5551

5652
[data-bs-theme='light'] {
57-
--dita-prussian-blue: #1d365d;
58-
--dita-maroon: #800000;
5953
--dita-violet: var(--bs-purple);
6054
}
6155
}
@@ -136,3 +130,14 @@
136130
.search-box:focus-visible {
137131
outline: -webkit-focus-ring-color auto 1px;
138132
}
133+
134+
.note {
135+
border-left: 6px solid;
136+
border-left-color: var(--bs-alert-color, transparent);
137+
}
138+
139+
[dir='rtl'] .note {
140+
border-right: 6px solid;
141+
border-right-color: var(--bs-alert-color, transparent);
142+
border-left: 0;
143+
}

css/custom.css

Lines changed: 734 additions & 10 deletions
Large diffs are not rendered by default.

xsl/utility-classes.xsl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@
596596
else if (@type='trouble') then 'alert-warning'
597597
else if (@type='danger') then 'alert-danger'
598598
else if (@type='notice') then 'alert-info'
599-
else if (@type='note') then 'alert-primary'
599+
else if (@type='note' or (contains(@class, ' topic/note ') and not(contains(@class, ' bootstrap-d/alert ')) and not(contains(@class, ' topic/section ')) and empty(@type))) then 'alert-primary'
600600
else if (@type='other') then 'alert-dark'
601601
else 'alert-info'"
602602
/>
@@ -795,7 +795,8 @@
795795
<xsl:variable name="icon">
796796
<xsl:value-of
797797
select="
798-
if (@type='tip') then $BOOTSTRAP_ICON_TIP
798+
if (@icon or contains(@otherprops, 'icon(') or *[contains(@class, ' topic/title ')]/*[contains(@class, ' bootstrap-d/icon ')]) then ''
799+
else if (@type='tip') then $BOOTSTRAP_ICON_TIP
799800
else if (@type='fastpath') then $BOOTSTRAP_ICON_FASTPATH
800801
else if (@type='remember') then $BOOTSTRAP_ICON_REMEMBER
801802
else if (@type='restriction') then $BOOTSTRAP_ICON_RESTRICTION
@@ -806,7 +807,7 @@
806807
else if (@type='trouble') then $BOOTSTRAP_ICON_TROUBLE
807808
else if (@type='danger') then $BOOTSTRAP_ICON_DANGER
808809
else if (@type='notice') then $BOOTSTRAP_ICON_NOTICE
809-
else if (@type='note') then $BOOTSTRAP_ICON_NOTE
810+
else if (@type='note' or (contains(@class, ' topic/note ') and not(contains(@class, ' bootstrap-d/alert ')) and not(contains(@class, ' topic/section ')) and empty(@type))) then $BOOTSTRAP_ICON_NOTE
810811
else ''"
811812
/>
812813
</xsl:variable>

0 commit comments

Comments
 (0)