forgejo/web_src/css/modules/container.css
silverwind 510252613f
[Port] gitea#30036: Remove fomantic container module
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 <teabot@gitea.io>

---

Conflict resolution: None
Ref: https://codeberg.org/forgejo/forgejo/issues/2776
(cherry picked from commit 2d281704de8c5b67592dd7f9362620927230ef2b)
2024-03-28 16:43:14 +01:00

79 lines
1.6 KiB
CSS

/* based on Fomantic UI container module, with just the parts extracted that we use. If you find any
unused rules here after refactoring, please remove them. */
.ui.container {
display: block;
max-width: 100%;
}
@media (max-width: 767.98px) {
.ui.ui.ui.container:not(.fluid) {
width: auto;
margin-left: 1em;
margin-right: 1em;
}
}
@media (min-width: 768px) and (max-width: 991.98px) {
.ui.ui.ui.container:not(.fluid) {
width: 723px;
margin-left: auto;
margin-right: auto;
}
}
@media (min-width: 992px) and (max-width: 1199.98px) {
.ui.ui.ui.container:not(.fluid) {
width: 933px;
margin-left: auto;
margin-right: auto;
}
}
@media (min-width: 1200px) {
.ui.ui.ui.container:not(.fluid) {
width: 1127px;
margin-left: auto;
margin-right: auto;
}
}
.ui.fluid.container {
width: 100%;
}
.ui[class*="center aligned"].container {
text-align: center;
}
/* overwrite width of containers inside the main page content div (div with class "page-content") */
.page-content .ui.ui.ui.container:not(.fluid) {
width: 1280px;
max-width: calc(100% - 64px);
margin-left: auto;
margin-right: auto;
}
.ui.container.fluid.padded {
padding: 0 32px;
}
/* enable fluid page widths for medium size viewports */
@media (min-width: 768px) and (max-width: 1200px) {
.page-content .ui.ui.ui.container:not(.fluid) {
max-width: calc(100% - 32px);
}
.ui.container.fluid.padded {
padding: 0 16px;
}
}
@media (max-width: 767.98px) {
.page-content .ui.ui.ui.container:not(.fluid) {
max-width: calc(100% - 16px);
}
.ui.container.fluid.padded {
padding: 0 8px;
}
}