Skip to content

Commit 008b703

Browse files
committed
Remove fomantic header module
1 parent 0bef9a2 commit 008b703

File tree

5 files changed

+163
-822
lines changed

5 files changed

+163
-822
lines changed

web_src/css/base.css

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,6 @@ a.label,
293293
background-color: var(--color-markup-code-block);
294294
}
295295

296-
.ui.dividing.header {
297-
border-bottom-color: var(--color-secondary);
298-
}
299-
300296
/* fix Fomantic's line-height cutting off "g" on Windows Chrome with Segoe UI */
301297
.ui.input > input {
302298
line-height: var(--line-height-default);
@@ -572,22 +568,10 @@ ol.ui.list li,
572568
visibility: visible !important;
573569
}
574570

575-
.ui.error.header {
576-
background: var(--color-error-bg) !important;
577-
color: var(--color-error-text) !important;
578-
border-color: var(--color-error-border) !important;
579-
}
580-
581571
.ui.error.segment {
582572
border-color: var(--color-error-border) !important;
583573
}
584574

585-
.ui.warning.header {
586-
background: var(--color-warning-bg) !important;
587-
color: var(--color-warning-text) !important;
588-
border-color: var(--color-warning-border) !important;
589-
}
590-
591575
.ui.warning.segment {
592576
border-color: var(--color-warning-border) !important;
593577
}
@@ -1081,10 +1065,6 @@ input:-webkit-autofill:active,
10811065
margin-bottom: 0;
10821066
}
10831067

1084-
.ui .normal.header {
1085-
font-weight: var(--font-weight-normal);
1086-
}
1087-
10881068
.ui .form .autofill-dummy {
10891069
position: absolute;
10901070
width: 1px;
@@ -1242,17 +1222,6 @@ input:-webkit-autofill:active,
12421222
margin-right: 0;
12431223
}
12441224

1245-
.ui.icon.header svg {
1246-
width: 3em;
1247-
height: 3em;
1248-
float: none;
1249-
display: block;
1250-
line-height: var(--line-height-default);
1251-
padding: 0;
1252-
margin: 0 auto 0.5rem;
1253-
opacity: 1;
1254-
}
1255-
12561225
.ui.floating.dropdown .overflow.menu .scrolling.menu.items {
12571226
border-radius: 0 !important;
12581227
box-shadow: none !important;
@@ -1280,11 +1249,6 @@ input:-webkit-autofill:active,
12801249
border-radius: var(--border-radius);
12811250
}
12821251

1283-
.attention-header {
1284-
padding: 0.5em 0.75em !important;
1285-
color: var(--color-text) !important;
1286-
}
1287-
12881252
.attention-icon {
12891253
margin: 2px 6px 0 0;
12901254
}
@@ -1744,35 +1708,6 @@ a.ui.basic.label:hover {
17441708
color: var(--color-text-light);
17451709
}
17461710

1747-
.ui.attached.header {
1748-
position: relative;
1749-
background: var(--color-box-header);
1750-
border-color: var(--color-secondary);
1751-
}
1752-
1753-
/* fix misaligned right buttons on box headers */
1754-
.ui.attached.header > .ui.right {
1755-
position: absolute;
1756-
right: 0.78571429rem;
1757-
top: 0;
1758-
bottom: 0;
1759-
display: flex;
1760-
align-items: center;
1761-
gap: 0.25em;
1762-
}
1763-
1764-
/* the default ".ui.attached.header > .ui.right" is only able to contain "tiny" buttons, other buttons are too large */
1765-
.ui.attached.header > .ui.right .ui.tiny.button {
1766-
padding: 6px 10px;
1767-
font-weight: var(--font-weight-normal);
1768-
}
1769-
1770-
/* if a .top.attached.header is followed by a .segment, add some margin */
1771-
.ui.segments + .ui.top.attached.header,
1772-
.ui.attached.segment + .ui.top.attached.header {
1773-
margin-top: 1rem;
1774-
}
1775-
17761711
.rss-icon {
17771712
display: inline-flex;
17781713
color: var(--color-text-light-1);
@@ -1828,11 +1763,6 @@ table th[data-sortt-desc] .svg {
18281763
background: var(--color-secondary-dark-1) !important;
18291764
}
18301765

1831-
/* https://github.com/go-gitea/gitea/pull/11486 */
1832-
.ui.sub.header {
1833-
text-transform: none;
1834-
}
1835-
18361766
.ui.tabular.menu {
18371767
border-color: var(--color-secondary);
18381768
}
@@ -1883,22 +1813,6 @@ table th[data-sortt-desc] .svg {
18831813
height: 0;
18841814
}
18851815

1886-
.ui.header {
1887-
color: var(--color-text);
1888-
}
1889-
1890-
.ui.header .ui.label {
1891-
margin-left: 0.25rem;
1892-
}
1893-
1894-
.ui.header > .ui.label.compact {
1895-
margin-top: inherit;
1896-
}
1897-
1898-
.ui.header .sub.header {
1899-
color: var(--color-text-light-1);
1900-
}
1901-
19021816
.flash-error details code,
19031817
.flash-warning details code {
19041818
display: block;

web_src/css/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
@import "./modules/svg.css";
1515
@import "./modules/flexcontainer.css";
1616
@import "./modules/message.css";
17+
@import "./modules/header.css";
1718

1819
@import "./shared/flex-list.css";
1920
@import "./shared/milestone.css";

web_src/css/modules/header.css

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
.ui.header {
2+
color: var(--color-text);
3+
border: none;
4+
margin: calc(2rem - 0.1428571428571429em) 0 1rem;
5+
padding: 0 0;
6+
font-family: var(--fonts-regular);
7+
font-weight: 500;
8+
line-height: 1.28571429em;
9+
text-transform: none;
10+
}
11+
12+
.ui.header:first-child {
13+
margin-top: -0.14285714em;
14+
}
15+
16+
.ui.header:last-child {
17+
margin-bottom: 0;
18+
}
19+
20+
.ui.header .ui.label {
21+
margin-left: 0.25rem;
22+
}
23+
24+
.ui.header > .ui.label.compact {
25+
margin-top: inherit;
26+
}
27+
28+
.ui.header .sub.header {
29+
display: block;
30+
font-weight: normal;
31+
padding: 0;
32+
margin: 0;
33+
font-size: 1rem;
34+
line-height: 1.2em;
35+
color: var(--color-text-light-1);
36+
}
37+
38+
.ui.header > i.icon {
39+
display: table-cell;
40+
opacity: 1;
41+
font-size: 1.5em;
42+
padding-top: 0;
43+
vertical-align: middle;
44+
}
45+
46+
.ui.header > i.icon:only-child {
47+
display: inline-block;
48+
padding: 0;
49+
margin-right: 0.75rem;
50+
}
51+
52+
.ui.header .ui.label {
53+
font-size: '';
54+
margin-left: 0.5rem;
55+
vertical-align: middle;
56+
}
57+
58+
.ui.header + p {
59+
margin-top: 0;
60+
}
61+
62+
h2.ui.header {
63+
font-size: 1.71428571rem;
64+
}
65+
h2.ui.header .sub.header {
66+
font-size: 1.14285714rem;
67+
}
68+
69+
h4.ui.header {
70+
font-size: 1.07142857rem;
71+
}
72+
h4.ui.header .sub.header {
73+
font-size: 1rem;
74+
}
75+
76+
.ui.sub.header {
77+
padding: 0;
78+
margin-bottom: 0.14285714rem;
79+
font-weight: 500;
80+
font-size: 0.85714286em;
81+
color: '';
82+
}
83+
84+
.ui.icon.header svg {
85+
width: 3em;
86+
height: 3em;
87+
float: none;
88+
display: block;
89+
line-height: var(--line-height-default);
90+
padding: 0;
91+
margin: 0 auto 0.5rem;
92+
opacity: 1;
93+
}
94+
95+
.ui.header:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
96+
font-size: 1.28571429em;
97+
}
98+
99+
.ui.attached.header {
100+
position: relative;
101+
background: var(--color-box-header);
102+
padding: 0.78571429rem 1rem;
103+
margin: 0 -1px 0 -1px;
104+
border-radius: 0;
105+
border: 1px solid var(--color-secondary);
106+
}
107+
108+
.ui.attached:not(.top).header {
109+
border-top: none;
110+
}
111+
112+
.ui.attached.header:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
113+
font-size: 1em;
114+
}
115+
116+
/* fix misaligned right buttons on box headers */
117+
.ui.attached.header > .ui.right {
118+
position: absolute;
119+
right: 0.78571429rem;
120+
top: 0;
121+
bottom: 0;
122+
display: flex;
123+
align-items: center;
124+
gap: 0.25em;
125+
}
126+
127+
/* the default ".ui.attached.header > .ui.right" is only able to contain "tiny" buttons, other buttons are too large */
128+
.ui.attached.header > .ui.right .ui.tiny.button {
129+
padding: 6px 10px;
130+
font-weight: var(--font-weight-normal);
131+
}
132+
133+
/* if a .top.attached.header is followed by a .segment, add some margin */
134+
.ui.segments + .ui.top.attached.header,
135+
.ui.attached.segment + .ui.top.attached.header {
136+
margin-top: 1rem;
137+
}
138+
139+
.ui.dividing.header {
140+
border-bottom-color: var(--color-secondary);
141+
}
142+
143+
.ui.error.header {
144+
background: var(--color-error-bg) !important;
145+
color: var(--color-error-text) !important;
146+
border-color: var(--color-error-border) !important;
147+
}
148+
149+
.ui.warning.header {
150+
background: var(--color-warning-bg) !important;
151+
color: var(--color-warning-text) !important;
152+
border-color: var(--color-warning-border) !important;
153+
}
154+
155+
.ui .normal.header {
156+
font-weight: var(--font-weight-normal);
157+
}
158+
159+
.attention-header {
160+
padding: 0.5em 0.75em !important;
161+
color: var(--color-text) !important;
162+
}

0 commit comments

Comments
 (0)