Skip to content

Commit b318611

Browse files
committed
Remove fomantic segment module
1 parent 90a4f9a commit b318611

File tree

4 files changed

+207
-48
lines changed

4 files changed

+207
-48
lines changed

web_src/css/base.css

+1-40
Original file line numberDiff line numberDiff line change
@@ -576,14 +576,6 @@ ol.ui.list li,
576576
visibility: visible !important;
577577
}
578578

579-
.ui.error.segment {
580-
border-color: var(--color-error-border) !important;
581-
}
582-
583-
.ui.warning.segment {
584-
border-color: var(--color-warning-border) !important;
585-
}
586-
587579
.ui.selection.active.dropdown,
588580
.ui.selection.active.dropdown:hover,
589581
.ui.selection.active.dropdown .menu,
@@ -931,8 +923,7 @@ input:-webkit-autofill:active,
931923
}
932924

933925
.ui.menu,
934-
.ui.vertical.menu,
935-
.ui.segment {
926+
.ui.vertical.menu {
936927
box-shadow: none;
937928
}
938929

@@ -1029,19 +1020,6 @@ input:-webkit-autofill:active,
10291020
vertical-align: middle;
10301021
}
10311022

1032-
.ui .info.segment.top h3,
1033-
.ui .info.segment.top h4 {
1034-
margin-top: 0;
1035-
}
1036-
1037-
.ui .info.segment.top h3:last-child {
1038-
margin-top: 4px;
1039-
}
1040-
1041-
.ui .info.segment.top > :last-child {
1042-
margin-bottom: 0;
1043-
}
1044-
10451023
.ui .form .autofill-dummy {
10461024
position: absolute;
10471025
width: 1px;
@@ -1678,23 +1656,6 @@ a.ui.basic.label:hover {
16781656
margin-left: 0;
16791657
}
16801658

1681-
.ui.segment,
1682-
.ui.segments,
1683-
.ui.attached.segment {
1684-
background: var(--color-box-body);
1685-
color: var(--color-text);
1686-
border-color: var(--color-secondary);
1687-
}
1688-
1689-
.ui.segments > .segment {
1690-
border-color: var(--color-secondary);
1691-
}
1692-
1693-
.ui.secondary.segment {
1694-
background: var(--color-secondary-bg);
1695-
color: var(--color-text-light);
1696-
}
1697-
16981659
.rss-icon {
16991660
display: inline-flex;
17001661
color: var(--color-text-light-1);

web_src/css/index.css

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
@import "./modules/normalize.css";
22
@import "./modules/animations.css";
3-
@import "./modules/grid.css";
3+
4+
/* fomantic replacements */
45
@import "./modules/button.css";
6+
@import "./modules/container.css";
7+
@import "./modules/divider.css";
8+
@import "./modules/header.css";
9+
@import "./modules/segment.css";
10+
@import "./modules/grid.css";
11+
@import "./modules/message.css";
12+
@import "./modules/card.css";
13+
@import "./modules/modal.css";
14+
515
@import "./modules/select.css";
616
@import "./modules/tippy.css";
7-
@import "./modules/modal.css";
817
@import "./modules/breadcrumb.css";
9-
@import "./modules/card.css";
1018
@import "./modules/comment.css";
1119
@import "./modules/navbar.css";
1220
@import "./modules/toast.css";
13-
@import "./modules/divider.css";
1421
@import "./modules/svg.css";
1522
@import "./modules/flexcontainer.css";
16-
@import "./modules/message.css";
17-
@import "./modules/container.css";
18-
@import "./modules/header.css";
1923

2024
@import "./shared/flex-list.css";
2125
@import "./shared/milestone.css";

web_src/css/modules/segment.css

+195
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
/* based on Fomantic UI header module, with just the parts extracted that we use. If you find any
2+
unused rules here after refactoring, please remove them. */
3+
4+
.ui.segment {
5+
position: relative;
6+
margin: 1rem 0;
7+
padding: 1em 1em;
8+
border-radius: 0.28571429rem;
9+
border: 1px solid var(--color-secondary);
10+
background: var(--color-box-body);
11+
color: var(--color-text);
12+
}
13+
.ui.segment:first-child {
14+
margin-top: 0;
15+
}
16+
.ui.segment:last-child {
17+
margin-bottom: 0;
18+
}
19+
20+
.ui.grid.segment {
21+
margin: 1rem 0;
22+
border-radius: 0.28571429rem;
23+
}
24+
25+
.ui.segment.tab:last-child {
26+
margin-bottom: 1rem;
27+
}
28+
29+
.ui.segments {
30+
flex-direction: column;
31+
position: relative;
32+
margin: 1rem 0;
33+
border: 1px solid var(--color-secondary);
34+
border-radius: 0.28571429rem;
35+
background: var(--color-box-body);
36+
color: var(--color-text);
37+
}
38+
.ui.segments:first-child {
39+
margin-top: 0;
40+
}
41+
.ui.segments:last-child {
42+
margin-bottom: 0;
43+
}
44+
45+
.ui.segments > .segment {
46+
top: 0;
47+
bottom: 0;
48+
border-radius: 0;
49+
margin: 0;
50+
width: auto;
51+
box-shadow: none;
52+
border: none;
53+
border-top: 1px solid var(--color-secondary);
54+
}
55+
.ui.segments:not(.horizontal) > .segment:first-child {
56+
top: 0;
57+
bottom: 0;
58+
border-top: none;
59+
margin-top: 0;
60+
margin-bottom: 0;
61+
border-radius: 0.28571429rem 0.28571429rem 0 0;
62+
}
63+
64+
.ui.segments:not(.horizontal) > .segment:last-child {
65+
top: 0;
66+
bottom: 0;
67+
margin-top: 0;
68+
margin-bottom: 0;
69+
border-radius: 0 0 0.28571429rem 0.28571429rem;
70+
}
71+
72+
.ui.segments:not(.horizontal) > .segment:only-child {
73+
border-radius: 0.28571429rem;
74+
}
75+
76+
.ui.segments > .ui.segments {
77+
border-top: 1px solid var(--color-secondary);
78+
margin: 1rem 1rem;
79+
}
80+
.ui.segments > .segments:first-child {
81+
border-top: none;
82+
}
83+
.ui.segments > .segment + .segments:not(.horizontal) {
84+
margin-top: 0;
85+
}
86+
87+
.ui.horizontal.segments {
88+
display: flex;
89+
flex-direction: row;
90+
background-color: transparent;
91+
padding: 0;
92+
margin: 1rem 0;
93+
border-radius: 0.28571429rem;
94+
border: 1px solid var(--color-secondary);
95+
}
96+
97+
.ui.horizontal.segments > .segment {
98+
margin: 0;
99+
min-width: 0;
100+
border-radius: 0;
101+
border: none;
102+
box-shadow: none;
103+
border-left: 1px solid var(--color-secondary);
104+
}
105+
106+
.ui.segments > .horizontal.segments:first-child {
107+
border-top: none;
108+
}
109+
.ui.horizontal.segments:not(.stackable) > .segment:first-child {
110+
border-left: none;
111+
}
112+
.ui.horizontal.segments > .segment:first-child {
113+
border-radius: 0.28571429rem 0 0 0.28571429rem;
114+
}
115+
.ui.horizontal.segments > .segment:last-child {
116+
border-radius: 0 0.28571429rem 0.28571429rem 0;
117+
}
118+
119+
.ui.clearing.segment:after {
120+
content: "";
121+
display: block;
122+
clear: both;
123+
}
124+
125+
.ui[class*="left aligned"].segment {
126+
text-align: left;
127+
}
128+
.ui[class*="center aligned"].segment {
129+
text-align: center;
130+
}
131+
132+
.ui.secondary.segment {
133+
background: var(--color-secondary-bg);
134+
color: var(--color-text-light);
135+
}
136+
137+
.ui.attached.segment {
138+
top: 0;
139+
bottom: 0;
140+
border-radius: 0;
141+
margin: 0 -1px;
142+
width: calc(100% + 2px);
143+
max-width: calc(100% + 2px);
144+
box-shadow: none;
145+
border: 1px solid var(--color-secondary);
146+
background: var(--color-box-body);
147+
color: var(--color-text);
148+
}
149+
.ui.attached:not(.message) + .ui.attached.segment:not(.top) {
150+
border-top: none;
151+
}
152+
153+
.ui[class*="top attached"].segment {
154+
bottom: 0;
155+
margin-bottom: 0;
156+
top: 0;
157+
margin-top: 1rem;
158+
border-radius: 0.28571429rem 0.28571429rem 0 0;
159+
}
160+
.ui.segment[class*="top attached"]:first-child {
161+
margin-top: 0;
162+
}
163+
164+
.ui.segment[class*="bottom attached"] {
165+
bottom: 0;
166+
margin-top: 0;
167+
top: 0;
168+
margin-bottom: 1rem;
169+
border-radius: 0 0 0.28571429rem 0.28571429rem;
170+
}
171+
.ui.segment[class*="bottom attached"]:last-child {
172+
margin-bottom: 1rem;
173+
}
174+
175+
.ui.fitted.segment:not(.horizontally) {
176+
padding-top: 0;
177+
padding-bottom: 0;
178+
}
179+
.ui.fitted.segment:not(.vertically) {
180+
padding-left: 0;
181+
padding-right: 0;
182+
}
183+
184+
.ui.segments .segment,
185+
.ui.segment {
186+
font-size: 1rem;
187+
}
188+
189+
.ui.error.segment {
190+
border-color: var(--color-error-border) !important;
191+
}
192+
193+
.ui.warning.segment {
194+
border-color: var(--color-warning-border) !important;
195+
}

web_src/fomantic/semantic.json

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"menu",
3434
"modal",
3535
"search",
36-
"segment",
3736
"tab",
3837
"table"
3938
]

0 commit comments

Comments
 (0)