diff options
Diffstat (limited to 'src/objects/_dialog.scss')
| -rw-r--r-- | src/objects/_dialog.scss | 83 |
1 files changed, 36 insertions, 47 deletions
diff --git a/src/objects/_dialog.scss b/src/objects/_dialog.scss index 54e9c59..f6e8e63 100644 --- a/src/objects/_dialog.scss +++ b/src/objects/_dialog.scss | |||
| @@ -1,18 +1,20 @@ | |||
| 1 | @use 'iro-sass/src/index' as iro; | 1 | @use 'iro-sass/src/index' as iro; |
| 2 | @use '../functions' as fn; | 2 | @use '../functions' as fn; |
| 3 | 3 | ||
| 4 | @use 'header'; | ||
| 5 | |||
| 4 | @include iro.props-namespace('dialog') { | 6 | @include iro.props-namespace('dialog') { |
| 5 | @include iro.props-store(( | 7 | @include iro.props-store(( |
| 6 | --dims: ( | 8 | --dims: ( |
| 7 | --pad-x: fn.global-dim(--size --300), | ||
| 8 | --pad-y: fn.global-dim(--size --300), | ||
| 9 | --width-sm: iro.fn-px-to-rem(500px), | 9 | --width-sm: iro.fn-px-to-rem(500px), |
| 10 | --width-md: iro.fn-px-to-rem(800px), | 10 | --width-md: iro.fn-px-to-rem(800px), |
| 11 | --width-lg: iro.fn-px-to-rem(1100px), | 11 | --width-lg: iro.fn-px-to-rem(1100px), |
| 12 | --rounding: 3px, | 12 | --rounding: 3px, |
| 13 | --sidebar: ( | 13 | --border: 1px, |
| 14 | --pad-x: fn.global-dim(--size --150), | 14 | |
| 15 | --pad-y: fn.global-dim(--size --300), | 15 | --body: ( |
| 16 | --pad-x: fn.global-dim(--size --200), | ||
| 17 | --pad-y: fn.global-dim(--size --200), | ||
| 16 | ) | 18 | ) |
| 17 | ), | 19 | ), |
| 18 | ), 'dims'); | 20 | ), 'dims'); |
| @@ -26,20 +28,18 @@ | |||
| 26 | 28 | ||
| 27 | @include iro.props-store(( | 29 | @include iro.props-store(( |
| 28 | --colors: ( | 30 | --colors: ( |
| 31 | --border: rgba(#000, .05), | ||
| 29 | --shadow: 0 .2em .5em rgba(#000, .2), | 32 | --shadow: 0 .2em .5em rgba(#000, .2), |
| 33 | |||
| 30 | --sidebar: ( | 34 | --sidebar: ( |
| 31 | --bg: fn.global-color(--bg), | ||
| 32 | --border: fn.global-color(--obj), | 35 | --border: fn.global-color(--obj), |
| 33 | ) | 36 | ), |
| 34 | ), | 37 | ), |
| 35 | ), 'colors'); | 38 | ), 'colors'); |
| 36 | 39 | ||
| 37 | @include iro.props-store(( | 40 | @include iro.props-store(( |
| 38 | --colors: ( | 41 | --colors: ( |
| 39 | --sidebar: ( | 42 | --border: rgba(#fff, .2), |
| 40 | --bg: fn.global-color(--bg-hi2), | ||
| 41 | --border: fn.global-color(--bg-hi2), | ||
| 42 | ), | ||
| 43 | ), | 43 | ), |
| 44 | ), 'colors-dark'); | 44 | ), 'colors-dark'); |
| 45 | 45 | ||
| @@ -48,9 +48,9 @@ | |||
| 48 | grid-template-rows: auto 1fr auto; | 48 | grid-template-rows: auto 1fr auto; |
| 49 | grid-template-columns: auto 1fr; | 49 | grid-template-columns: auto 1fr; |
| 50 | grid-template-areas: | 50 | grid-template-areas: |
| 51 | 'sidebar header' | 51 | 'sidebar-header header' |
| 52 | 'sidebar body' | 52 | 'sidebar body' |
| 53 | 'sidebar footer'; | 53 | 'sidebar footer'; |
| 54 | position: relative; | 54 | position: relative; |
| 55 | box-sizing: border-box; | 55 | box-sizing: border-box; |
| 56 | width: 100%; | 56 | width: 100%; |
| @@ -59,7 +59,7 @@ | |||
| 59 | overflow: hidden; | 59 | overflow: hidden; |
| 60 | border-radius: fn.dim(--rounding); | 60 | border-radius: fn.dim(--rounding); |
| 61 | background-color: fn.global-color(--bg); | 61 | background-color: fn.global-color(--bg); |
| 62 | box-shadow: fn.color(--shadow); | 62 | box-shadow: 0 0 0 1px fn.color(--border), fn.color(--shadow); |
| 63 | color: fn.global-color(--fg); | 63 | color: fn.global-color(--fg); |
| 64 | 64 | ||
| 65 | @include iro.bem-modifier('sm') { | 65 | @include iro.bem-modifier('sm') { |
| @@ -70,52 +70,41 @@ | |||
| 70 | max-width: fn.dim(--width-lg); | 70 | max-width: fn.dim(--width-lg); |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | @include iro.bem-elem('sidebar') { | 73 | @include iro.bem-elem('sidebar-header') { |
| 74 | grid-area: sidebar; | 74 | grid-area: sidebar-header; |
| 75 | padding: fn.dim(--sidebar --pad-y) fn.dim(--sidebar --pad-x); | 75 | border-right: 1px solid fn.color(--sidebar --border); |
| 76 | border-right: 1px solid fn.color(--sidebar --border); | 76 | |
| 77 | background-color: fn.color(--sidebar --bg); | 77 | @include iro.bem-sibling-elem('header') { |
| 78 | grid-area: header; | ||
| 79 | } | ||
| 78 | } | 80 | } |
| 79 | 81 | ||
| 80 | @include iro.bem-elem('header') { | 82 | @include iro.bem-elem('header') { |
| 81 | grid-area: header; | 83 | grid-area: sidebar-header / sidebar-header / header / header; |
| 82 | margin: fn.dim(--pad-y) fn.dim(--pad-x) 0; | 84 | } |
| 83 | 85 | ||
| 84 | @include iro.bem-sibling-elem('body') { | 86 | @include iro.bem-elem('close-btn') { |
| 85 | &::before { | 87 | margin-left: auto; |
| 86 | display: none; | ||
| 87 | } | ||
| 88 | } | ||
| 89 | } | 88 | } |
| 90 | 89 | ||
| 91 | @include iro.bem-elem('body') { | 90 | @include iro.bem-elem('label') { |
| 92 | grid-area: body; | 91 | padding: 0 calc(fn.dim(--body --pad-x) - fn.foreign-dim(--header, --pad-x)); |
| 93 | min-height: 0; | 92 | } |
| 94 | margin: fn.dim(--pad-y) fn.dim(--pad-x); | ||
| 95 | 93 | ||
| 96 | &::before { | 94 | @include iro.bem-elem('sidebar') { |
| 97 | content: ''; | 95 | grid-area: sidebar; |
| 98 | width: fn.global-dim(--size --500); | ||
| 99 | height: fn.global-dim(--size --500); | ||
| 100 | float: right; | ||
| 101 | } | ||
| 102 | } | 96 | } |
| 103 | 97 | ||
| 104 | @include iro.bem-elem('close-btn') { | 98 | @include iro.bem-elem('body') { |
| 105 | position: absolute; | 99 | grid-area: body; |
| 106 | top: fn.global-dim(--size --150); | 100 | min-height: 0; |
| 107 | right: fn.global-dim(--size --150); | 101 | padding: fn.dim(--body --pad-y) fn.dim(--body --pad-x); |
| 108 | font-size: fn.global-dim(--font-size --150); | ||
| 109 | } | 102 | } |
| 110 | 103 | ||
| 111 | @include iro.bem-elem('footer') { | 104 | @include iro.bem-elem('footer') { |
| 112 | grid-area: footer; | 105 | grid-area: footer; |
| 113 | justify-content: flex-end; | 106 | justify-content: flex-end; |
| 114 | margin: 0 fn.dim(--pad-x) fn.dim(--pad-y); | 107 | padding: fn.dim(--body --pad-y) fn.dim(--body --pad-x); |
| 115 | } | ||
| 116 | |||
| 117 | @include iro.bem-elem('title') { | ||
| 118 | margin-top: 0; | ||
| 119 | } | 108 | } |
| 120 | } | 109 | } |
| 121 | } | 110 | } |
