diff options
author | silverwind <me@silverwind.io> | 2024-03-24 15:04:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-24 14:04:18 +0000 |
commit | 2d281704de8c5b67592dd7f9362620927230ef2b (patch) | |
tree | 3ca83b5e4f0ce69088d8f6dc6b1ceafafe960248 /web_src/css | |
parent | 5bd0773741be8f9476be0c76e8733f8c9dd65d19 (diff) | |
download | gitea-2d281704de8c5b67592dd7f9362620927230ef2b.tar.gz gitea-2d281704de8c5b67592dd7f9362620927230ef2b.zip |
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 <teabot@gitea.io>
Diffstat (limited to 'web_src/css')
-rw-r--r-- | web_src/css/base.css | 35 | ||||
-rw-r--r-- | web_src/css/index.css | 1 | ||||
-rw-r--r-- | web_src/css/modules/container.css | 78 |
3 files changed, 83 insertions, 31 deletions
diff --git a/web_src/css/base.css b/web_src/css/base.css index 226ec70386..51a4852e7e 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -352,6 +352,10 @@ ol.ui.list li, border-right-color: var(--color-primary); } +.ui.menu { + display: flex; +} + .ui.menu, .ui.vertical.menu { background: var(--color-menu); @@ -738,37 +742,6 @@ img.ui.avatar, padding-top: 14px; } -/* overwrite semantic 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; - } -} - .ui.pagination.menu .active.item { color: var(--color-text); background: var(--color-active); diff --git a/web_src/css/index.css b/web_src/css/index.css index e8df321829..7ba19e62d4 100644 --- a/web_src/css/index.css +++ b/web_src/css/index.css @@ -14,6 +14,7 @@ @import "./modules/svg.css"; @import "./modules/flexcontainer.css"; @import "./modules/message.css"; +@import "./modules/container.css"; @import "./modules/header.css"; @import "./shared/flex-list.css"; diff --git a/web_src/css/modules/container.css b/web_src/css/modules/container.css new file mode 100644 index 0000000000..dc854f89d0 --- /dev/null +++ b/web_src/css/modules/container.css @@ -0,0 +1,78 @@ +/* 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; + } +} |