open-consul/ui-v2/app/styles/layouts/containers.scss
John Cowen c7d89f364d
UI: CSS refactor (#4430) + Fullscreen Layout (#4435)
* Begin refactoring CSS into component folders. Moved most
components into layout/skin folders, left out a couple of ones I want
to think about more.
* Adjust grays based on recent Structure changes 
* Switch to fullscreen layout for lists and detail, left aligned forms (#4435)
* Specifically use the 'actions_close' label, not just the :last-child (actions-group)
* Replace some non-var-ed colours in vaults code skin, plus prefixing (black and white)
2018-08-29 12:11:58 +01:00

58 lines
1.8 KiB
SCSS

$ideal-viewport-width-num: 1260;
$ideal-viewport-width: #{$ideal-viewport-width-num}px;
$ideal-content-width-num: 1150;
$ideal-content-width: #{$ideal-content-width-num}px;
$ideal-viewport-padding-num: 24;
$ideal-viewport-padding: #{ideal-viewport-padding-num}px;
$minimum-viewport-padding: 10px;
$ideal-content-padding: 33px;
// workaround bulma's sweeping box-sizing
// so we can verify the ideal widths are the same
%viewport-container {
box-sizing: content-box;
}
%viewport-container {
margin-left: auto;
margin-right: auto;
}
%content-container > * {
box-sizing: border-box;
}
%content-container-restricted {
max-width: $ideal-content-width;
}
%viewport-container {
padding-left: calc(#{$ideal-viewport-padding-num}% / (#{$ideal-viewport-width-num} / 100));
padding-right: calc(#{$ideal-viewport-padding-num}% / (#{$ideal-viewport-width-num} / 100));
padding-left: calc(#{$ideal-viewport-padding-num}vw / (#{$ideal-viewport-width-num} / 100));
padding-right: calc(#{$ideal-viewport-padding-num}vw / (#{$ideal-viewport-width-num} / 100));
}
@media #{$--min-padding} {
%viewport-container {
padding-left: $minimum-viewport-padding;
padding-right: $minimum-viewport-padding;
}
%content-container {
padding-left: $ideal-viewport-padding;
padding-right: $ideal-viewport-padding;
}
}
@media #{$--max-padding} {
%viewport-container {
padding-left: $ideal-viewport-padding;
padding-right: $ideal-viewport-padding;
}
%content-container {
padding-left: $ideal-viewport-padding;
padding-right: $ideal-viewport-padding;
}
}
%content-container {
padding-left: calc(33% / (#{$ideal-viewport-width-num} / 100));
padding-right: calc(33% / (#{$ideal-viewport-width-num} / 100));
padding-left: calc(24vw / (#{$ideal-viewport-width-num} / 100));
padding-right: calc(24vw / (#{$ideal-viewport-width-num} / 100));
}