jojo/web_src/css/modules/container.css
Cameron Radmore 6b75654cc2 chore: enforce RTL-friendly logical CSS properties with a linter (#12491)
Related issue: https://codeberg.org/forgejo/forgejo/issues/8581

This should be a nice first step towards RTL support. Future PRs can look at updating the tailwind classes, changing some of the icons (arrow left might need to become arrow right in some cases for example, and updating the template files)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12491
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2026-05-11 00:20:45 +02:00

61 lines
1.4 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;
--container-width: 100%;
max-width: var(--container-width);
}
@media (max-width: 767.98px) {
.ui.ui.ui.container:not(.fluid) {
--container-width: auto;
width: var(--container-width);
margin-inline: 1em;
}
}
@media (min-width: 768px) and (max-width: 991.98px) {
.ui.ui.ui.container:not(.fluid) {
--container-width: 723px;
width: var(--container-width);
margin-inline: auto;
}
}
@media (min-width: 992px) and (max-width: 1199.98px) {
.ui.ui.ui.container:not(.fluid) {
--container-width: 933px;
width: var(--container-width);
margin-inline: auto;
}
}
@media (min-width: 1200px) {
.ui.ui.ui.container:not(.fluid) {
--container-width: 1127px;
width: var(--container-width);
margin-inline: auto;
}
}
.ui.fluid.container {
--container-width: 100%;
width: var(--container-width);
}
.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) {
--container-width: 1280px;
width: var(--container-width);
max-width: calc(100% - calc(2 * var(--page-margin-x)));
margin-inline: auto;
}
.ui.container.fluid.padded {
padding: 0 var(--page-margin-x);
}