Skip to content

Commit 2d28170

Browse files
silverwindGiteaBot
andauthored
Remove fomantic container module (#30036)
Small CSS module. There was a ordering conflict between `.ui.menu` and `.ui.container` which I've solved by adding the `.ui.menu` rule into base. --------- Co-authored-by: Giteabot <[email protected]>
1 parent 5bd0773 commit 2d28170

File tree

5 files changed

+83
-189
lines changed

5 files changed

+83
-189
lines changed

web_src/css/base.css

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,10 @@ ol.ui.list li,
352352
border-right-color: var(--color-primary);
353353
}
354354

355+
.ui.menu {
356+
display: flex;
357+
}
358+
355359
.ui.menu,
356360
.ui.vertical.menu {
357361
background: var(--color-menu);
@@ -738,37 +742,6 @@ img.ui.avatar,
738742
padding-top: 14px;
739743
}
740744

741-
/* overwrite semantic width of containers inside the main page content div (div with class "page-content") */
742-
.page-content .ui.ui.ui.container:not(.fluid) {
743-
width: 1280px;
744-
max-width: calc(100% - 64px);
745-
margin-left: auto;
746-
margin-right: auto;
747-
}
748-
749-
.ui.container.fluid.padded {
750-
padding: 0 32px;
751-
}
752-
753-
/* enable fluid page widths for medium size viewports */
754-
@media (min-width: 768px) and (max-width: 1200px) {
755-
.page-content .ui.ui.ui.container:not(.fluid) {
756-
max-width: calc(100% - 32px);
757-
}
758-
.ui.container.fluid.padded {
759-
padding: 0 16px;
760-
}
761-
}
762-
763-
@media (max-width: 767.98px) {
764-
.page-content .ui.ui.ui.container:not(.fluid) {
765-
max-width: calc(100% - 16px);
766-
}
767-
.ui.container.fluid.padded {
768-
padding: 0 8px;
769-
}
770-
}
771-
772745
.ui.pagination.menu .active.item {
773746
color: var(--color-text);
774747
background: var(--color-active);

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/container.css";
1718
@import "./modules/header.css";
1819

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

web_src/css/modules/container.css

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/* based on Fomantic UI container 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.container {
5+
display: block;
6+
max-width: 100%;
7+
}
8+
9+
@media (max-width: 767.98px) {
10+
.ui.ui.ui.container:not(.fluid) {
11+
width: auto;
12+
margin-left: 1em;
13+
margin-right: 1em;
14+
}
15+
}
16+
17+
@media (min-width: 768px) and (max-width: 991.98px) {
18+
.ui.ui.ui.container:not(.fluid) {
19+
width: 723px;
20+
margin-left: auto;
21+
margin-right: auto;
22+
}
23+
}
24+
25+
@media (min-width: 992px) and (max-width: 1199.98px) {
26+
.ui.ui.ui.container:not(.fluid) {
27+
width: 933px;
28+
margin-left: auto;
29+
margin-right: auto;
30+
}
31+
}
32+
33+
@media (min-width: 1200px) {
34+
.ui.ui.ui.container:not(.fluid) {
35+
width: 1127px;
36+
margin-left: auto;
37+
margin-right: auto;
38+
}
39+
}
40+
41+
.ui.fluid.container {
42+
width: 100%;
43+
}
44+
45+
.ui[class*="center aligned"].container {
46+
text-align: center;
47+
}
48+
49+
/* overwrite width of containers inside the main page content div (div with class "page-content") */
50+
.page-content .ui.ui.ui.container:not(.fluid) {
51+
width: 1280px;
52+
max-width: calc(100% - 64px);
53+
margin-left: auto;
54+
margin-right: auto;
55+
}
56+
57+
.ui.container.fluid.padded {
58+
padding: 0 32px;
59+
}
60+
61+
/* enable fluid page widths for medium size viewports */
62+
@media (min-width: 768px) and (max-width: 1200px) {
63+
.page-content .ui.ui.ui.container:not(.fluid) {
64+
max-width: calc(100% - 32px);
65+
}
66+
.ui.container.fluid.padded {
67+
padding: 0 16px;
68+
}
69+
}
70+
71+
@media (max-width: 767.98px) {
72+
.page-content .ui.ui.ui.container:not(.fluid) {
73+
max-width: calc(100% - 16px);
74+
}
75+
.ui.container.fluid.padded {
76+
padding: 0 8px;
77+
}
78+
}

web_src/fomantic/build/semantic.css

Lines changed: 0 additions & 157 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web_src/fomantic/semantic.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"api",
2525
"button",
2626
"checkbox",
27-
"container",
2827
"dimmer",
2928
"dropdown",
3029
"form",

0 commit comments

Comments
 (0)