Skip to content

Commit ca8a4d3

Browse files
committed
Refactor table styles to _tables.scss and fix AI page tables
Extracts common table styles into a new partial `_tables.scss` and imports it globally. This replaces the duplicated `table` style blocks previously found in `ai.scss`, `research.scss`, and `capabilities.scss`. This change ensures consistent styling for all tables within the main content area (`main table`) and specifically fixes the unstyled "Four Mindsets" table on the AI Research page, which was previously missing styles due to a CSS selector mismatch. Fixes #1236
1 parent d355901 commit ca8a4d3

File tree

5 files changed

+37
-93
lines changed

5 files changed

+37
-93
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
@import "_variables.scss";
2+
3+
main table {
4+
border: 1px solid $border-light;
5+
border-collapse: collapse;
6+
width: 100%;
7+
margin-bottom: 1.5rem;
8+
9+
tr {
10+
11+
th,
12+
td {
13+
margin: 0;
14+
padding: 0.5em 0.75em;
15+
vertical-align: top;
16+
}
17+
18+
th {
19+
background-color: $background-medium;
20+
text-align: left;
21+
}
22+
23+
td {
24+
font-weight: 300;
25+
font-size: 0.9em;
26+
}
27+
28+
&:nth-child(even) {
29+
background-color: $background-light;
30+
}
31+
}
32+
}

hugo/themes/dora-2025/assets/scss/ai.scss

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -118,35 +118,4 @@ tab_links {
118118
max-width: 24em;
119119
}
120120

121-
.mainContent table {
122-
border: 1px solid $border-light;
123-
border-collapse: collapse;
124-
width: 100%;
125-
126-
tr {
127-
128-
th,
129-
td {
130-
margin: 0;
131-
padding: 0.5em 0.75em;
132-
vertical-align: top;
133-
}
134-
135-
th {
136-
background-color: $background-medium;
137-
text-align: left;
138-
}
139-
140-
td {
141-
font-family: $font-roboto;
142-
font-weight: 300;
143-
font-size: 0.9em;
144-
}
145-
146-
&:nth-child(even) {
147-
background-color: $background-light;
148-
}
149-
}
150-
}
151-
152121
@import "_dora-perspective.scss";

hugo/themes/dora-2025/assets/scss/capabilities.scss

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
border: 1px solid $border-light;
1111
border-radius: 0.5em;
1212
display: flex;
13-
flex-direction: column;
13+
flex-direction: column;
1414
grid-template-areas:
1515
"heading"
1616
"content";
@@ -21,13 +21,13 @@
2121
margin: 0;
2222
padding: .75rem 0.5rem 0 0.75rem;
2323
display: flex;
24-
gap:4px;
24+
gap: 4px;
2525
flex-direction: row;
2626

2727
a {
2828
color: $color-text;
2929
text-decoration: none;
30-
flex-grow:1;
30+
flex-grow: 1;
3131
}
3232

3333
.core,
@@ -94,33 +94,6 @@ article {
9494
font-size: 0.80em;
9595
}
9696

97-
table {
98-
border: 1px solid $border-light;
99-
border-collapse: collapse;
100-
101-
tr {
102-
103-
th,
104-
td {
105-
margin: 0;
106-
padding: 0.25em 0.75em;
107-
}
108-
109-
th {
110-
background-color: $background-medium;
111-
}
112-
113-
td {
114-
font-family: $font-roboto;
115-
font-weight: 300;
116-
font-size: 0.9em;
117-
}
118-
119-
&:nth-child(even) {
120-
background-color: $background-light;
121-
}
122-
}
123-
}
12497
}
12598

12699
section.hasSidebar {
@@ -193,4 +166,4 @@ h1.tags {
193166

194167
.measures-table {
195168
margin-bottom: 1.5rem;
196-
}
169+
}

hugo/themes/dora-2025/assets/scss/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
@import "awards.scss";
2020
@import "insights-list.scss";
2121
@import "section.scss";
22+
@import "_tables.scss";
2223

2324
:root {
2425
font-family: "Google Sans Flex", Arial, Helvetica, sans-serif;

hugo/themes/dora-2025/assets/scss/research.scss

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -132,37 +132,6 @@ tab_links {
132132
max-width: 24em;
133133
}
134134

135-
.mainContent table {
136-
border: 1px solid $border-light;
137-
border-collapse: collapse;
138-
width: 100%;
139-
140-
tr {
141-
142-
th,
143-
td {
144-
margin: 0;
145-
padding: 0.5em 0.75em;
146-
vertical-align: top;
147-
}
148-
149-
th {
150-
background-color: $background-medium;
151-
text-align: left;
152-
}
153-
154-
td {
155-
font-family: $font-roboto;
156-
font-weight: 300;
157-
font-size: 0.9em;
158-
}
159-
160-
&:nth-child(even) {
161-
background-color: $background-light;
162-
}
163-
}
164-
}
165-
166135
.container-wide {
167136
max-width: $layout-breakpoint-maxplus;
168137
margin: 0 auto;

0 commit comments

Comments
 (0)