Skip to content

Commit

Permalink
Refs #141204 simplified container overrides:
Browse files Browse the repository at this point in the history
- We should only have the hide classes instead of customizing container width
  based on the toolbar and sidebar elements.
  Since the markup is styled with flex there is no need to modify the width
  from the default SemanticUI
  • Loading branch information
ichim-david committed Nov 9, 2021
1 parent 56a12e2 commit 5125003
Showing 1 changed file with 3 additions and 54 deletions.
57 changes: 3 additions & 54 deletions theme/themes/eea/elements/container.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,17 @@
Theme Overrides
*******************************/

@toolbarWidth: 80px;
@sidebarWidth: 375px;
@collapsedWidth: 20px;

/* All Sizes */
.ui.container {
display: block;
max-width: @maxWidth !important;
transition: width 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045),
margin-left 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045),
margin-right 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

.contentWidthMedia(@width, @gutter, @offset) {
.ui.container {
width: @width !important;
margin-right: @gutter !important;
margin-left: @gutter !important;
}

.drag.handle.wrapper {
margin-left: @offset !important;
}

.block .delete-button {
margin-right: @offset !important;
}
margin-left 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045),
margin-right 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

.contentWidth(@offset) {
@media only screen and (max-width: @largestMobileScreen + @offset) {
.contentWidthMedia(@mobileWidth, @mobileGutter, -12px);

[class*='mobile hidden'],
[class*='tablet only']:not(.mobile),
[class*='computer only']:not(.mobile),
Expand All @@ -45,8 +23,6 @@
}
}
@media only screen and (min-width: @tabletBreakpoint + @offset) and (max-width: @largestTabletScreen + @offset) {
.contentWidthMedia(@tabletWidth, @tabletGutter, -30px);

[class*='mobile only']:not(.tablet),
[class*='tablet hidden'],
[class*='computer only']:not(.tablet),
Expand All @@ -57,7 +33,6 @@
}
}
@media only screen and (min-width: @computerBreakpoint + @offset) and (max-width: @largestSmallMonitor + @offset) {
.contentWidthMedia(@computerWidth, @computerGutter, -30px);

[class*='mobile only']:not(.computer),
[class*='tablet only']:not(.computer),
Expand All @@ -69,8 +44,6 @@
}
}
@media only screen and (min-width: @largeMonitorBreakpoint + @offset) {
.contentWidthMedia(@largeMonitorWidth, @largeMonitorGutter, -30px);

[class*='mobile only']:not([class*='large screen']),
[class*='tablet only']:not([class*='large screen']),
[class*='computer only']:not([class*='large screen']),
Expand All @@ -82,34 +55,10 @@
}
}

body:not(.has-toolbar):not(.has-sidebar):not(.has-toolbar-collapsed):not(.has-sidebar-collapsed) {
body {
.contentWidth(0);
}

body.has-toolbar:not(.has-sidebar):not(.has-sidebar-collapsed) {
.contentWidth(@toolbarWidth);
}

body.has-toolbar.has-sidebar {
.contentWidth(@toolbarWidth + @sidebarWidth);
}

body.has-toolbar.has-sidebar-collapsed {
.contentWidth(@toolbarWidth + @collapsedWidth);
}

body.has-toolbar-collapsed:not(.has-sidebar):not(.has-sidebar-collapsed) {
.contentWidth(@collapsedWidth);
}

body.has-toolbar-collapsed.has-sidebar {
.contentWidth(@collapsedWidth + @sidebarWidth);
}

body.has-toolbar-collapsed.has-sidebar-collapsed {
.contentWidth(@collapsedWidth + @collapsedWidth);
}

.drag.handle.wrapper {
margin-left: -15px !important;
}
Expand Down

0 comments on commit 5125003

Please sign in to comment.