Debian Codegraph @

vendor/static/bulma/sass/form/file.sass

raw
1 $file-border-color: $border !default
2 $file-radius: $radius !default
3
4 $file-cta-background-color: $scheme-main-ter !default
5 $file-cta-color: $text !default
6 $file-cta-hover-color: $text-strong !default
7 $file-cta-active-color: $text-strong !default
8
9 $file-name-border-color: $border !default
10 $file-name-border-style: solid !default
11 $file-name-border-width: 1px 1px 1px 0 !default
12 $file-name-max-width: 16em !default
13
14 $file-colors: $form-colors !default
15
16 .file
17 @extend %unselectable
18 align-items: stretch
19 display: flex
20 justify-content: flex-start
21 position: relative
22 // Colors
23 @each $name, $pair in $file-colors
24 $color: nth($pair, 1)
25 $color-invert: nth($pair, 2)
26 &.is-#{$name}
27 .file-cta
28 background-color: $color
29 border-color: transparent
30 color: $color-invert
31 &:hover,
32 &.is-hovered
33 .file-cta
34 background-color: bulmaDarken($color, 2.5%)
35 border-color: transparent
36 color: $color-invert
37 &:focus,
38 &.is-focused
39 .file-cta
40 border-color: transparent
41 box-shadow: 0 0 0.5em bulmaRgba($color, 0.25)
42 color: $color-invert
43 &:active,
44 &.is-active
45 .file-cta
46 background-color: bulmaDarken($color, 5%)
47 border-color: transparent
48 color: $color-invert
49 // Sizes
50 &.is-small
51 font-size: $size-small
52 &.is-normal
53 font-size: $size-normal
54 &.is-medium
55 font-size: $size-medium
56 .file-icon
57 .fa
58 font-size: 21px
59 &.is-large
60 font-size: $size-large
61 .file-icon
62 .fa
63 font-size: 28px
64 // Modifiers
65 &.has-name
66 .file-cta
67 border-bottom-right-radius: 0
68 border-top-right-radius: 0
69 .file-name
70 border-bottom-left-radius: 0
71 border-top-left-radius: 0
72 &.is-empty
73 .file-cta
74 border-radius: $file-radius
75 .file-name
76 display: none
77 &.is-boxed
78 .file-label
79 flex-direction: column
80 .file-cta
81 flex-direction: column
82 height: auto
83 padding: 1em 3em
84 .file-name
85 border-width: 0 1px 1px
86 .file-icon
87 height: 1.5em
88 width: 1.5em
89 .fa
90 font-size: 21px
91 &.is-small
92 .file-icon .fa
93 font-size: 14px
94 &.is-medium
95 .file-icon .fa
96 font-size: 28px
97 &.is-large
98 .file-icon .fa
99 font-size: 35px
100 &.has-name
101 .file-cta
102 border-radius: $file-radius $file-radius 0 0
103 .file-name
104 border-radius: 0 0 $file-radius $file-radius
105 border-width: 0 1px 1px
106 &.is-centered
107 justify-content: center
108 &.is-fullwidth
109 .file-label
110 width: 100%
111 .file-name
112 flex-grow: 1
113 max-width: none
114 &.is-right
115 justify-content: flex-end
116 .file-cta
117 border-radius: 0 $file-radius $file-radius 0
118 .file-name
119 border-radius: $file-radius 0 0 $file-radius
120 border-width: 1px 0 1px 1px
121 order: -1
122
123 .file-label
124 align-items: stretch
125 display: flex
126 cursor: pointer
127 justify-content: flex-start
128 overflow: hidden
129 position: relative
130 &:hover
131 .file-cta
132 background-color: bulmaDarken($file-cta-background-color, 2.5%)
133 color: $file-cta-hover-color
134 .file-name
135 border-color: bulmaDarken($file-name-border-color, 2.5%)
136 &:active
137 .file-cta
138 background-color: bulmaDarken($file-cta-background-color, 5%)
139 color: $file-cta-active-color
140 .file-name
141 border-color: bulmaDarken($file-name-border-color, 5%)
142
143 .file-input
144 height: 100%
145 left: 0
146 opacity: 0
147 outline: none
148 position: absolute
149 top: 0
150 width: 100%
151
152 .file-cta,
153 .file-name
154 @extend %control
155 border-color: $file-border-color
156 border-radius: $file-radius
157 font-size: 1em
158 padding-left: 1em
159 padding-right: 1em
160 white-space: nowrap
161
162 .file-cta
163 background-color: $file-cta-background-color
164 color: $file-cta-color
165
166 .file-name
167 border-color: $file-name-border-color
168 border-style: $file-name-border-style
169 border-width: $file-name-border-width
170 display: block
171 max-width: $file-name-max-width
172 overflow: hidden
173 text-align: inherit
174 text-overflow: ellipsis
175
176 .file-icon
177 align-items: center
178 display: flex
179 height: 1em
180 justify-content: center
181 +ltr-property("margin", 0.5em)
182 width: 1em
183 .fa
184 font-size: 14px