@ulu/frontend 0.1.0-beta.6 → 0.1.0-beta.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +428 -0
- package/dist/ulu-frontend.min.css +1 -1
- package/dist/ulu-frontend.min.js +28 -27
- package/docs-dev/assets/main.js +832 -421
- package/docs-dev/assets/placeholder/icon-calendar.svg +1 -0
- package/docs-dev/assets/placeholder/icon-check.svg +1 -0
- package/docs-dev/assets/style.css +629 -233
- package/docs-dev/changelog/index.html +6236 -0
- package/docs-dev/changelog/updates-and-changes/index.html +5109 -0
- package/docs-dev/demos/accordion/index.html +904 -321
- package/docs-dev/demos/basic-hero/index.html +111 -0
- package/docs-dev/demos/breakpoints-manager/index.html +5246 -0
- package/docs-dev/demos/button/index.html +916 -323
- package/docs-dev/demos/button-verbose/index.html +5238 -0
- package/docs-dev/demos/callout/index.html +951 -328
- package/docs-dev/demos/captioned-figure/index.html +904 -321
- package/docs-dev/demos/card/index.html +970 -748
- package/docs-dev/demos/card-grid/index.html +5357 -0
- package/docs-dev/demos/card-new/index.html +5088 -0
- package/docs-dev/demos/card-old/index.html +5223 -0
- package/docs-dev/demos/card.1/index.html +5223 -0
- package/docs-dev/demos/card.TRASH/index.html +5541 -0
- package/docs-dev/demos/counter-list/index.html +5224 -0
- package/docs-dev/demos/css-icons/index.html +904 -321
- package/docs-dev/demos/data-grid/index.html +1014 -511
- package/docs-dev/demos/data-table/index.html +1064 -348
- package/docs-dev/demos/details-group/index.html +5267 -0
- package/docs-dev/demos/file-save/index.html +904 -321
- package/docs-dev/demos/flipcard/index.html +904 -321
- package/docs-dev/demos/form-theme/index.html +922 -352
- package/docs-dev/demos/hero/index.html +12 -4
- package/docs-dev/demos/image-grid/index.html +12 -4
- package/docs-dev/demos/index.html +905 -322
- package/docs-dev/demos/list-inline/index.html +5220 -0
- package/docs-dev/demos/list-inline.1/index.html +4727 -0
- package/docs-dev/demos/list-lines/index.html +5210 -0
- package/docs-dev/demos/menu-stack/index.html +975 -377
- package/docs-dev/demos/modals/index.html +1010 -357
- package/docs-dev/demos/nav-strip/index.html +904 -321
- package/docs-dev/demos/overlay-section/index.html +979 -326
- package/docs-dev/demos/popovers/index.html +1152 -327
- package/docs-dev/demos/print/index.html +904 -321
- package/docs-dev/demos/pull-quote/index.html +904 -321
- package/docs-dev/demos/rule/index.html +952 -357
- package/docs-dev/demos/scroll-slider/index.html +72 -106
- package/docs-dev/demos/scrollpoints/index.html +905 -322
- package/docs-dev/demos/slider/index.html +12 -4
- package/docs-dev/demos/spoke-spinner/index.html +904 -321
- package/docs-dev/demos/sticky-list/index.html +5223 -0
- package/docs-dev/demos/tabs/index.html +944 -325
- package/docs-dev/demos/tag/index.html +904 -321
- package/docs-dev/demos/theme-toggle/index.html +5279 -0
- package/docs-dev/demos/tile-grid-overlay/index.html +12 -4
- package/docs-dev/demos/tiles/index.html +904 -321
- package/docs-dev/demos/tooltip/index.html +904 -321
- package/docs-dev/guide/building-stylesheet/index.html +904 -321
- package/docs-dev/guide/developing-ulu-scss-module/index.html +904 -321
- package/docs-dev/guide/index.html +904 -321
- package/docs-dev/guide/updates-and-changes/index.html +5033 -0
- package/docs-dev/index.html +904 -321
- package/docs-dev/javascript/events/index.html +901 -320
- package/docs-dev/javascript/index.html +904 -321
- package/docs-dev/javascript/settings/index.html +5400 -0
- package/docs-dev/javascript/ui-breakpoints/index.html +916 -335
- package/docs-dev/javascript/ui-collapsible/index.html +901 -320
- package/docs-dev/javascript/ui-details-group/index.html +5322 -0
- package/docs-dev/javascript/ui-dialog/index.html +967 -371
- package/docs-dev/javascript/ui-flipcard/index.html +964 -327
- package/docs-dev/javascript/ui-grid/index.html +913 -358
- package/docs-dev/javascript/ui-modal-builder/index.html +1067 -366
- package/docs-dev/javascript/ui-overflow-scroller/index.html +901 -320
- package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +901 -320
- package/docs-dev/javascript/ui-page/index.html +901 -320
- package/docs-dev/javascript/ui-popover/index.html +911 -334
- package/docs-dev/javascript/ui-print/index.html +901 -328
- package/docs-dev/javascript/ui-print-details/index.html +901 -320
- package/docs-dev/javascript/ui-programmatic-modal/index.html +901 -320
- package/docs-dev/javascript/ui-proxy-click/index.html +990 -324
- package/docs-dev/javascript/ui-resizer/index.html +901 -320
- package/docs-dev/javascript/ui-scroll-slider/index.html +941 -328
- package/docs-dev/javascript/ui-scrollpoint/index.html +907 -333
- package/docs-dev/javascript/ui-slider/index.html +1099 -327
- package/docs-dev/javascript/ui-tabs/index.html +914 -370
- package/docs-dev/javascript/ui-theme-toggle/index.html +5410 -0
- package/docs-dev/javascript/ui-tooltip/index.html +940 -363
- package/docs-dev/javascript/utils-class-logger/index.html +901 -320
- package/docs-dev/javascript/utils-css/index.html +5224 -0
- package/docs-dev/javascript/utils-dom/index.html +1054 -339
- package/docs-dev/javascript/utils-file-save/index.html +901 -320
- package/docs-dev/javascript/utils-floating-ui/index.html +901 -320
- package/docs-dev/javascript/utils-id/index.html +901 -320
- package/docs-dev/javascript/utils-pause-youtube-video/index.html +901 -320
- package/docs-dev/javascript/utils-system/index.html +5527 -0
- package/docs-dev/sass/base/color/index.html +901 -320
- package/docs-dev/sass/base/elements/index.html +901 -320
- package/docs-dev/sass/base/index/index.html +901 -320
- package/docs-dev/sass/base/index.html +904 -321
- package/docs-dev/sass/base/keyframes/index.html +901 -320
- package/docs-dev/sass/base/layout/index.html +901 -320
- package/docs-dev/sass/base/normalize/index.html +901 -320
- package/docs-dev/sass/base/print/index.html +901 -320
- package/docs-dev/sass/base/root/index.html +901 -320
- package/docs-dev/sass/base/typography/index.html +901 -320
- package/docs-dev/sass/components/accordion/index.html +908 -327
- package/docs-dev/sass/components/adaptive-spacing/index.html +901 -320
- package/docs-dev/sass/components/badge/index.html +909 -328
- package/docs-dev/sass/components/basic-hero/index.html +5385 -0
- package/docs-dev/sass/components/button/index.html +901 -320
- package/docs-dev/sass/components/button-verbose/index.html +989 -333
- package/docs-dev/sass/components/callout/index.html +1018 -414
- package/docs-dev/sass/components/captioned-figure/index.html +1026 -330
- package/docs-dev/sass/components/card/index.html +1003 -350
- package/docs-dev/sass/components/card-grid/index.html +901 -320
- package/docs-dev/sass/components/counter-list/index.html +5458 -0
- package/docs-dev/sass/components/css-icon/index.html +918 -330
- package/docs-dev/sass/components/data-grid/index.html +922 -334
- package/docs-dev/sass/components/data-table/index.html +1106 -333
- package/docs-dev/sass/components/fill-context/index.html +901 -320
- package/docs-dev/sass/components/flipcard/index.html +939 -327
- package/docs-dev/sass/components/flipcard-grid/index.html +901 -320
- package/docs-dev/sass/components/form-theme/index.html +1110 -433
- package/docs-dev/sass/components/hero/index.html +995 -366
- package/docs-dev/sass/components/horizontal-rule/index.html +901 -320
- package/docs-dev/sass/components/image-grid/index.html +901 -320
- package/docs-dev/sass/components/index/index.html +915 -330
- package/docs-dev/sass/components/index.html +904 -321
- package/docs-dev/sass/components/links/index.html +901 -320
- package/docs-dev/sass/components/list-inline/index.html +5399 -0
- package/docs-dev/sass/components/list-lines/index.html +936 -359
- package/docs-dev/sass/components/list-ordered/index.html +903 -322
- package/docs-dev/sass/components/list-unordered/index.html +901 -320
- package/docs-dev/sass/components/menu-stack/index.html +973 -379
- package/docs-dev/sass/components/modal/index.html +953 -365
- package/docs-dev/sass/components/nav-strip/index.html +909 -328
- package/docs-dev/sass/components/overlay-section/index.html +909 -328
- package/docs-dev/sass/components/pager/index.html +901 -320
- package/docs-dev/sass/components/placeholder-block/index.html +901 -320
- package/docs-dev/sass/components/popover/index.html +996 -379
- package/docs-dev/sass/components/pull-quote/index.html +913 -332
- package/docs-dev/sass/components/ratio-box/index.html +909 -328
- package/docs-dev/sass/components/rule/index.html +909 -328
- package/docs-dev/sass/components/scroll-slider/index.html +944 -375
- package/docs-dev/sass/components/skip-link/index.html +909 -328
- package/docs-dev/sass/components/slider/index.html +989 -420
- package/docs-dev/sass/components/spoke-spinner/index.html +903 -322
- package/docs-dev/sass/components/sticky-list/index.html +5603 -0
- package/docs-dev/sass/components/tabs/index.html +910 -329
- package/docs-dev/sass/components/tag/index.html +903 -322
- package/docs-dev/sass/components/tile-button/index.html +901 -320
- package/docs-dev/sass/components/tile-grid/index.html +901 -320
- package/docs-dev/sass/components/tile-grid-overlay/index.html +901 -320
- package/docs-dev/sass/components/vignette/index.html +915 -328
- package/docs-dev/sass/components/wysiwyg/index.html +901 -320
- package/docs-dev/sass/core/breakpoint/index.html +947 -352
- package/docs-dev/sass/core/button/index.html +901 -320
- package/docs-dev/sass/core/color/index.html +1078 -364
- package/docs-dev/sass/core/cssvar/index.html +901 -320
- package/docs-dev/sass/core/element/index.html +1096 -368
- package/docs-dev/sass/core/index.html +901 -320
- package/docs-dev/sass/core/layout/index.html +961 -361
- package/docs-dev/sass/core/path/index.html +901 -320
- package/docs-dev/sass/core/selector/index.html +901 -320
- package/docs-dev/sass/core/typography/index.html +901 -320
- package/docs-dev/sass/core/units/index.html +911 -324
- package/docs-dev/sass/core/utils/index.html +1871 -430
- package/docs-dev/sass/helpers/color/index.html +901 -320
- package/docs-dev/sass/helpers/display/index.html +902 -321
- package/docs-dev/sass/helpers/index/index.html +901 -320
- package/docs-dev/sass/helpers/index.html +904 -321
- package/docs-dev/sass/helpers/print/index.html +843 -292
- package/docs-dev/sass/helpers/typography/index.html +901 -320
- package/docs-dev/sass/helpers/units/index.html +901 -320
- package/docs-dev/sass/helpers/utilities/index.html +903 -322
- package/docs-dev/sass/index.html +904 -321
- package/js/index.js +1 -0
- package/js/settings.js +95 -0
- package/js/ui/breakpoints.js +19 -16
- package/js/ui/collapsible.js +8 -1
- package/js/ui/details-group.js +112 -0
- package/js/ui/dialog.js +90 -42
- package/js/ui/dialog.todo +2 -36
- package/js/ui/flipcard.js +37 -57
- package/js/ui/grid.js +15 -13
- package/js/ui/index.js +1 -0
- package/js/ui/modal-builder.js +76 -56
- package/js/ui/overflow-scroller.js +6 -4
- package/js/ui/popover.js +38 -38
- package/js/ui/print.js +16 -25
- package/js/ui/programmatic-modal.js +9 -3
- package/js/ui/proxy-click.js +50 -36
- package/js/ui/scroll-slider.js +24 -30
- package/js/ui/scrollpoint.js +28 -64
- package/js/ui/slider.js +108 -63
- package/js/ui/tabs.js +23 -36
- package/js/ui/theme-toggle.js +331 -94
- package/js/ui/tooltip.js +27 -32
- package/js/utils/css.js +13 -0
- package/js/utils/dom.js +85 -8
- package/js/utils/font-awesome.js +18 -0
- package/js/utils/index.js +2 -1
- package/js/utils/system.js +154 -0
- package/package.json +14 -7
- package/scss/_breakpoint.scss +16 -3
- package/scss/_color.scss +36 -5
- package/scss/_element.scss +94 -2
- package/scss/_layout.scss +7 -8
- package/scss/_units.scss +3 -2
- package/scss/_utils.scss +248 -13
- package/scss/components/README.todos +14 -0
- package/scss/components/_accordion.scss +5 -7
- package/scss/components/_basic-hero.scss +112 -0
- package/scss/components/_button-verbose.scss +100 -18
- package/scss/components/_callout.scss +125 -78
- package/scss/components/_captioned-figure.scss +17 -0
- package/scss/components/_card-grid.scss +1 -1
- package/scss/components/_card.scss +246 -74
- package/scss/components/_counter-list.scss +137 -0
- package/scss/components/_css-icon.scss +25 -21
- package/scss/components/_data-grid.scss +38 -9
- package/scss/components/_data-table.scss +44 -4
- package/scss/components/_flipcard.scss +8 -3
- package/scss/components/_form-theme.scss +119 -108
- package/scss/components/_hero.scss +12 -10
- package/scss/components/_index.scss +24 -0
- package/scss/components/_list-inline.scss +80 -0
- package/scss/components/_list-lines.scss +44 -32
- package/scss/components/_menu-stack.scss +42 -26
- package/scss/components/_modal.scss +13 -6
- package/scss/components/_nav-strip.scss +2 -0
- package/scss/components/_overlay-section.scss +2 -5
- package/scss/components/_popover.scss +165 -64
- package/scss/components/_pull-quote.scss +13 -13
- package/scss/components/_ratio-box.scss +2 -5
- package/scss/components/_rule.scss +1 -0
- package/scss/components/_scroll-slider.scss +1 -5
- package/scss/components/_slider.scss +49 -72
- package/scss/components/_spoke-spinner.scss +2 -2
- package/scss/components/_sticky-list.scss +206 -0
- package/scss/components/_tabs.scss +3 -1
- package/scss/components/_vignette.scss +3 -5
- package/scss/helpers/_display.scss +15 -18
- package/scss/helpers/_print.scss +12 -7
- package/scss/helpers/_utilities.scss +42 -32
- package/types/index.d.ts +1 -0
- package/types/settings.d.ts +66 -0
- package/types/settings.d.ts.map +1 -0
- package/types/ui/breakpoints.d.ts +14 -14
- package/types/ui/breakpoints.d.ts.map +1 -1
- package/types/ui/collapsible.d.ts.map +1 -1
- package/types/ui/details-group.d.ts +38 -0
- package/types/ui/details-group.d.ts.map +1 -0
- package/types/ui/dialog.d.ts +20 -14
- package/types/ui/dialog.d.ts.map +1 -1
- package/types/ui/flipcard.d.ts +16 -10
- package/types/ui/flipcard.d.ts.map +1 -1
- package/types/ui/grid.d.ts +4 -6
- package/types/ui/grid.d.ts.map +1 -1
- package/types/ui/index.d.ts +1 -0
- package/types/ui/modal-builder.d.ts +93 -11
- package/types/ui/modal-builder.d.ts.map +1 -1
- package/types/ui/overflow-scroller.d.ts +2 -2
- package/types/ui/overflow-scroller.d.ts.map +1 -1
- package/types/ui/popover.d.ts +6 -7
- package/types/ui/popover.d.ts.map +1 -1
- package/types/ui/print.d.ts +0 -4
- package/types/ui/print.d.ts.map +1 -1
- package/types/ui/programmatic-modal.d.ts.map +1 -1
- package/types/ui/proxy-click.d.ts +19 -3
- package/types/ui/proxy-click.d.ts.map +1 -1
- package/types/ui/scroll-slider.d.ts +5 -7
- package/types/ui/scroll-slider.d.ts.map +1 -1
- package/types/ui/scrollpoint.d.ts +3 -8
- package/types/ui/scrollpoint.d.ts.map +1 -1
- package/types/ui/slider.d.ts +33 -14
- package/types/ui/slider.d.ts.map +1 -1
- package/types/ui/tabs.d.ts +6 -8
- package/types/ui/tabs.d.ts.map +1 -1
- package/types/ui/theme-toggle.d.ts +51 -7
- package/types/ui/theme-toggle.d.ts.map +1 -1
- package/types/ui/tooltip.d.ts +3 -5
- package/types/ui/tooltip.d.ts.map +1 -1
- package/types/utils/css.d.ts +11 -0
- package/types/utils/css.d.ts.map +1 -0
- package/types/utils/dom.d.ts +45 -6
- package/types/utils/dom.d.ts.map +1 -1
- package/types/utils/font-awesome.d.ts +5 -0
- package/types/utils/font-awesome.d.ts.map +1 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/system.d.ts +113 -0
- package/types/utils/system.d.ts.map +1 -0
package/scss/_utils.scss
CHANGED
|
@@ -20,7 +20,7 @@ $config: (
|
|
|
20
20
|
"debug-maps": true,
|
|
21
21
|
"file-header-comments": true,
|
|
22
22
|
"responsive-change": 0.5vw,
|
|
23
|
-
"pixel-em-base" : 16px
|
|
23
|
+
"pixel-em-base" : 16px,
|
|
24
24
|
) !default;
|
|
25
25
|
|
|
26
26
|
/// Change modules $config
|
|
@@ -34,8 +34,12 @@ $config: (
|
|
|
34
34
|
|
|
35
35
|
/// Get a config option
|
|
36
36
|
/// @param {Map} $name Name of property
|
|
37
|
-
/// @
|
|
38
|
-
/// @
|
|
37
|
+
/// @compiler
|
|
38
|
+
/// @use "index" as ulu;
|
|
39
|
+
/// @example scss {compile} Example usage
|
|
40
|
+
/// .test-em-to-pixel {
|
|
41
|
+
/// width: ulu.utils-get("pixel-em-base");
|
|
42
|
+
/// }
|
|
39
43
|
|
|
40
44
|
@function get($name) {
|
|
41
45
|
@return require-map-get($config, $name, 'utils');
|
|
@@ -47,6 +51,13 @@ $config: (
|
|
|
47
51
|
/// @param {String} $key The key in the map to get value from
|
|
48
52
|
/// @param {String} $context The context of using this function for debugging help
|
|
49
53
|
/// @return {*} The value from the map
|
|
54
|
+
/// @compiler
|
|
55
|
+
/// @use "index" as ulu;
|
|
56
|
+
/// @example scss {compile} Example usage
|
|
57
|
+
/// .test-require-map {
|
|
58
|
+
/// $test-map: ("test-font-size": 12px);
|
|
59
|
+
/// font-size: ulu.utils-require-map-get($test-map, "test-font-size");
|
|
60
|
+
/// }
|
|
50
61
|
|
|
51
62
|
@function require-map-get($map, $key, $context: "unknown") {
|
|
52
63
|
// $value: map.get($map, $key);
|
|
@@ -128,24 +139,49 @@ $config: (
|
|
|
128
139
|
|
|
129
140
|
// Returns number unit info, and strips the unit
|
|
130
141
|
/// @param {String} $number Number to get meta info for
|
|
131
|
-
/// @return {Map} With properties (unit, value)
|
|
142
|
+
/// @return {Map} With properties (unit, value, invalid [true/false if not number])
|
|
132
143
|
|
|
133
|
-
@function number-info($number) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
144
|
+
@function number-info($number, $errors: false) {
|
|
145
|
+
|
|
146
|
+
@if (meta.type-of($number) == 'number') {
|
|
147
|
+
$is-unitless: math.is-unitless($number);
|
|
137
148
|
@return (
|
|
138
|
-
"unit": null,
|
|
139
|
-
"value": $number
|
|
149
|
+
"unit": if($is-unitless, null, math.unit($number)),
|
|
150
|
+
"value": if($is-unitless, $number, strip-unit($number)),
|
|
151
|
+
"invalid" : false
|
|
140
152
|
);
|
|
153
|
+
|
|
141
154
|
} @else {
|
|
155
|
+
@if ($errors) {
|
|
156
|
+
@error "Expected Number, got #{ meta.type-of($number) } for #{ $number }";
|
|
157
|
+
}
|
|
142
158
|
@return (
|
|
143
|
-
"unit"
|
|
144
|
-
"value":
|
|
159
|
+
"unit": null,
|
|
160
|
+
"value": $number,
|
|
161
|
+
"invalid" : true
|
|
145
162
|
);
|
|
146
163
|
}
|
|
147
164
|
}
|
|
148
165
|
|
|
166
|
+
/// Adds unit to unitless number
|
|
167
|
+
/// @param {Number} $number The unitless number to add unit to
|
|
168
|
+
/// @param {String} $unit The unit to add to number
|
|
169
|
+
/// @return {String} Number with unit attached (can't be used in maths)
|
|
170
|
+
|
|
171
|
+
@function add-unit($number, $unit) {
|
|
172
|
+
@return $number + string.unquote($unit);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/// Checks if two numbers are the same unit
|
|
176
|
+
/// @param {Number} $number
|
|
177
|
+
/// @param {String} $other-number
|
|
178
|
+
/// @return {Boolean} Whether they have the same unit type
|
|
179
|
+
// Could be made into multiple arguments in future if needed
|
|
180
|
+
|
|
181
|
+
@function units-match($number, $other-number) {
|
|
182
|
+
@return math.unit($number) == math.unit($other-number);
|
|
183
|
+
}
|
|
184
|
+
|
|
149
185
|
/// Reusable merge method
|
|
150
186
|
/// @param {Map} $original Source map
|
|
151
187
|
/// @param {Map} $changes Changes to merge into source map
|
|
@@ -448,9 +484,23 @@ $config: (
|
|
|
448
484
|
/// Strips the unit from the number
|
|
449
485
|
/// - Normally this shouldn't be needed
|
|
450
486
|
/// @link https://stackoverflow.com/questions/12328259/how-do-you-strip-the-unit-from-any-number-in-sass/12335841#12335841 Original source (Miriam Suzanne)
|
|
487
|
+
/// @compiler
|
|
488
|
+
/// @use "index" as ulu;
|
|
489
|
+
/// @example scss {compile} Example usage
|
|
490
|
+
/// .test {
|
|
491
|
+
/// line-height: ulu.utils-strip-unit(4rem);
|
|
492
|
+
/// }
|
|
451
493
|
|
|
452
494
|
@function strip-unit($value) {
|
|
453
|
-
@
|
|
495
|
+
@if (is-number($value)) {
|
|
496
|
+
@if (math.is-unitless($value)) {
|
|
497
|
+
@return $value;
|
|
498
|
+
} @else {
|
|
499
|
+
@return math.div($value, ($value * 0 + 1));
|
|
500
|
+
}
|
|
501
|
+
} @else {
|
|
502
|
+
@error "Expected number, got #{ $value }";
|
|
503
|
+
}
|
|
454
504
|
}
|
|
455
505
|
|
|
456
506
|
/// Calculate the size of something at a given scale (percentage/exponential)
|
|
@@ -485,4 +535,189 @@ $config: (
|
|
|
485
535
|
) {
|
|
486
536
|
#{ $property } : $value;
|
|
487
537
|
#{ $property } : calc(#{ $value } + #{ $responsive-change });
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/// Calculates the hypotenuse of a triangle
|
|
541
|
+
/// - Can be used to get length between two corners of a rectangle
|
|
542
|
+
/// @param {Number} $width The width of the triangle
|
|
543
|
+
/// @param {Number} $height The height of the triangle
|
|
544
|
+
/// @return {Number} Hypotenuse of a triangle
|
|
545
|
+
|
|
546
|
+
@function hypotenuse($width, $height) {
|
|
547
|
+
@return math.sqrt(math.pow($width, 2) + math.pow($height, 2));
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/// Get's the info about a box shadow
|
|
551
|
+
/// @param {List} $shadow The box shadow property (ie. 0 0 4px red)
|
|
552
|
+
/// @return {Map} Map with info about the shadow with the following keys (inset, offset-x, offset-y, blur, spread, color)
|
|
553
|
+
/// @throw When shadow is not type list
|
|
554
|
+
|
|
555
|
+
@function box-shadow-info($shadow) {
|
|
556
|
+
@if (meta.type-of($shadow) != "list") {
|
|
557
|
+
@error "Box shadow passed is not correct type (list)";
|
|
558
|
+
}
|
|
559
|
+
$result: (
|
|
560
|
+
"inset": false,
|
|
561
|
+
"offset-x": 0,
|
|
562
|
+
"offset-y": 0,
|
|
563
|
+
"blur": 0,
|
|
564
|
+
"spread": 0,
|
|
565
|
+
"color": null,
|
|
566
|
+
);
|
|
567
|
+
|
|
568
|
+
$number-keys: ("offset-x", "offset-y", "blur", "spread");
|
|
569
|
+
$number-index: 1;
|
|
570
|
+
|
|
571
|
+
@each $value in $shadow {
|
|
572
|
+
$type: meta.type-of($value);
|
|
573
|
+
@if $type == "color" {
|
|
574
|
+
$result: map.merge($result, ("color": $value));
|
|
575
|
+
} @else if $type == "string" and $value == inset {
|
|
576
|
+
$result: map.merge($result, ("inset": true));
|
|
577
|
+
} @else if $type == "number" and $number-index <= 4 {
|
|
578
|
+
// Add each back in by key in the order they appear
|
|
579
|
+
// if not found it's the default
|
|
580
|
+
$result: map.merge($result, (list.nth($number-keys, $number-index): $value));
|
|
581
|
+
$number-index: $number-index + 1;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
@return $result;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/// Get's the extent (how far the shadow extends past the box's edge)
|
|
589
|
+
/// - This will only work on box-shadows that have matching units for the numbers
|
|
590
|
+
/// @param {List} $shadow The box shadow property (ie. 0 0 4px red)
|
|
591
|
+
/// @param {String} $side Optionally pass the side of box to get extend for, if not specified offsets are ignored and just the extent of the shadow is passed
|
|
592
|
+
/// @return {Number} The size the shadow extends past it's box
|
|
593
|
+
|
|
594
|
+
@function box-shadow-extent($shadow, $side: null) {
|
|
595
|
+
$info: box-shadow-info($shadow);
|
|
596
|
+
$extent: map.get($info, "spread") + map.get($info, "blur");
|
|
597
|
+
$offset-x: map.get($info, "offset-x");
|
|
598
|
+
$offset-y: map.get($info, "offset-y");
|
|
599
|
+
@if (not $side) {
|
|
600
|
+
@return $extent;
|
|
601
|
+
} @else {
|
|
602
|
+
@if ($side == "top") {
|
|
603
|
+
@return $extent - $offset-y;
|
|
604
|
+
} @else if ($side == "bottom") {
|
|
605
|
+
@return $extent + $offset-y;
|
|
606
|
+
} @else if ($side == "left") {
|
|
607
|
+
@return $extent - $offset-x;
|
|
608
|
+
} @else if ($side == "right") {
|
|
609
|
+
@return $extent + $offset-x;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/// Determines if value passed is a list
|
|
615
|
+
/// @param {*} $value Value to check
|
|
616
|
+
/// @return {Boolean} Whether the item was type list
|
|
617
|
+
|
|
618
|
+
@function is-list($value) {
|
|
619
|
+
@return meta.type-of($value) == "list";
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/// Determines if value passed is a map
|
|
623
|
+
/// @param {*} $value Value to check
|
|
624
|
+
/// @return {Boolean} Whether the item was type map
|
|
625
|
+
|
|
626
|
+
@function is-map($value) {
|
|
627
|
+
@return meta.type-of($value) == "map";
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/// Determines if value passed is a number
|
|
631
|
+
/// @param {*} $value Value to check
|
|
632
|
+
/// @return {Boolean} Whether the item was type number
|
|
633
|
+
|
|
634
|
+
@function is-number($value) {
|
|
635
|
+
@return meta.type-of($value) == "number";
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/// Determines if value passed is a string
|
|
639
|
+
/// @param {*} $value Value to check
|
|
640
|
+
/// @return {Boolean} Whether the item was type string
|
|
641
|
+
|
|
642
|
+
@function is-string($value) {
|
|
643
|
+
@return meta.type-of($value) == "string";
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
/// Determines if value passed is a color
|
|
647
|
+
/// @param {*} $value Value to check
|
|
648
|
+
/// @return {Boolean} Whether the item was type color
|
|
649
|
+
|
|
650
|
+
@function is-color($value) {
|
|
651
|
+
@return meta.type-of($value) == "color";
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
// /// Determines if value passed is a bool
|
|
657
|
+
// /// @param {*} $value Value to check
|
|
658
|
+
// /// @return {Boolean} Whether the item was type bool
|
|
659
|
+
|
|
660
|
+
// @function is-bool($value) {
|
|
661
|
+
// @return meta.type-of($value) == "bool";
|
|
662
|
+
// }
|
|
663
|
+
|
|
664
|
+
// /// Determines if value passed is a null
|
|
665
|
+
// /// @param {*} $value Value to check
|
|
666
|
+
// /// @return {Boolean} Whether the item was type null
|
|
667
|
+
|
|
668
|
+
// @function is-null($value) {
|
|
669
|
+
// @return meta.type-of($value) == "null";
|
|
670
|
+
// }
|
|
671
|
+
|
|
672
|
+
/// Returns true if number passed is even
|
|
673
|
+
/// - Allows unit and unitless numbers
|
|
674
|
+
/// @param {Number} $number The number to check
|
|
675
|
+
/// @return {Boolean} Whether or not it is an even number
|
|
676
|
+
|
|
677
|
+
@function is-even($number) {
|
|
678
|
+
@if (is-number($number)) {
|
|
679
|
+
@return strip-unit($number) % 2 == 0;
|
|
680
|
+
} @else {
|
|
681
|
+
@error "Expected Number, got #{ $number }";
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/// Returns true if number passed is odd
|
|
686
|
+
/// @param {Number} $number The number to check
|
|
687
|
+
/// @return {Boolean} Whether or not it is an odd number
|
|
688
|
+
|
|
689
|
+
@function is-odd($number) {
|
|
690
|
+
@return not is-even($number);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/// Always returns a map
|
|
694
|
+
/// @param {*} $value The value to check if is map
|
|
695
|
+
/// @return {Map} The $value if it was a map, else empty map
|
|
696
|
+
|
|
697
|
+
@function ensure-map($value) {
|
|
698
|
+
@return if(is-map($value), $value, ());
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/// Returns true if edge passed is an end (top/bottom)
|
|
702
|
+
/// @param {String} $edge The edge string to test
|
|
703
|
+
/// @return {Boolean} Whether the edge was an end (versus side/x-axis)
|
|
704
|
+
/// @throw If $edge is not a valid value (not top/bottom/left/right)
|
|
705
|
+
|
|
706
|
+
@function is-end($edge) {
|
|
707
|
+
@if ($edge == "top" or $edge == "bottom") {
|
|
708
|
+
@return true;
|
|
709
|
+
} @else if ($edge == "left" or $edge == "right") {
|
|
710
|
+
@return false;
|
|
711
|
+
} @else {
|
|
712
|
+
@error "Expected side to be top/bottom/left/right, got #{ $edge }";
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/// Returns true if edge passed is an side (left/right)
|
|
717
|
+
/// @param {String} $edge The edge string to test
|
|
718
|
+
/// @return {Boolean} Whether the edge was an side (versus end/y-axis)
|
|
719
|
+
/// @throw If $edge is not a valid value (not top/bottom/left/right)
|
|
720
|
+
|
|
721
|
+
@function is-side($edge) {
|
|
722
|
+
@return not is-end($edge);
|
|
488
723
|
}
|
|
@@ -13,3 +13,17 @@ Todos:
|
|
|
13
13
|
* May override base styles
|
|
14
14
|
* May contain layouts
|
|
15
15
|
* May wrap or contain base (button vs button-group)
|
|
16
|
+
|
|
17
|
+
Daniel Todos:
|
|
18
|
+
☐ Remove uswds stylings for informative and emergency callouts and move it into soar's site
|
|
19
|
+
☐ get rid of extra styles in frontend to clean up the left cap
|
|
20
|
+
✔ add a dash to left-cap mixin (to make private) and remove documentation for that mixin @done
|
|
21
|
+
✔ setup cap colors (define colors) @done
|
|
22
|
+
remove the width of the individual callout styles
|
|
23
|
+
remove background-dark, light, emergency styles
|
|
24
|
+
☐ Reach out to Rachel about the bug with the theme toggle not working
|
|
25
|
+
☐ ask her to recreate it
|
|
26
|
+
☐ Setup search results page
|
|
27
|
+
☐ General Node/Page Setup
|
|
28
|
+
☐ Setup View
|
|
29
|
+
|
|
@@ -120,7 +120,7 @@ $config: (
|
|
|
120
120
|
& + & {
|
|
121
121
|
$gap: -(get("margin") - get("margin-between"));
|
|
122
122
|
margin-top: $gap;
|
|
123
|
-
margin-top: calc($gap -
|
|
123
|
+
margin-top: calc($gap - get("border-width"));
|
|
124
124
|
}
|
|
125
125
|
&[open],
|
|
126
126
|
&.is-active {
|
|
@@ -145,10 +145,9 @@ $config: (
|
|
|
145
145
|
vertical-align: top;
|
|
146
146
|
font-weight: bold;
|
|
147
147
|
cursor: pointer;
|
|
148
|
+
display: flex; // For icon
|
|
149
|
+
align-items: center;
|
|
148
150
|
&:has(#{ $prefix }__icon) {
|
|
149
|
-
display: flex; // For icon
|
|
150
|
-
align-items: center;
|
|
151
|
-
justify-content: space-between;
|
|
152
151
|
list-style: none; // Remove the default arrow (old safari?)
|
|
153
152
|
&::-webkit-details-marker,
|
|
154
153
|
&::marker {
|
|
@@ -172,8 +171,8 @@ $config: (
|
|
|
172
171
|
#{ $prefix }__icon {
|
|
173
172
|
flex: 0 0 get("icon-size");
|
|
174
173
|
color: color.get(get("icon-color"));
|
|
175
|
-
margin-left:
|
|
176
|
-
|
|
174
|
+
margin-left: auto;
|
|
175
|
+
padding-left: 0.5em;
|
|
177
176
|
background-color: color.get(get("icon-background-color"));
|
|
178
177
|
border-radius: get("icon-border-radius");
|
|
179
178
|
width: get("icon-size");
|
|
@@ -209,7 +208,6 @@ $config: (
|
|
|
209
208
|
}
|
|
210
209
|
#{ $prefix }--no-borders {
|
|
211
210
|
border: none;
|
|
212
|
-
margin-bottom: 4rem;
|
|
213
211
|
&[open] > .accordion__summary {
|
|
214
212
|
border-bottom: none;
|
|
215
213
|
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// @group basic-hero
|
|
3
|
+
/// Basic styling for a hero
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
@use "sass:map";
|
|
7
|
+
@use "sass:math";
|
|
8
|
+
@use "sass:meta";
|
|
9
|
+
@use "sass:list";
|
|
10
|
+
|
|
11
|
+
@use "../breakpoint";
|
|
12
|
+
@use "../selector";
|
|
13
|
+
@use "../utils";
|
|
14
|
+
@use "../typography";
|
|
15
|
+
@use "../color";
|
|
16
|
+
|
|
17
|
+
// Used for function fallback
|
|
18
|
+
$-fallbacks: (
|
|
19
|
+
"main-max-width" : (
|
|
20
|
+
"function" : meta.get-function("get", false, "typography"),
|
|
21
|
+
"property" : "max-width"
|
|
22
|
+
),
|
|
23
|
+
"main-min-width" : (
|
|
24
|
+
"function" : meta.get-function("get", false, "typography"),
|
|
25
|
+
"property" : "max-width-small"
|
|
26
|
+
),
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
/// Module Settings
|
|
30
|
+
/// @type Map
|
|
31
|
+
/// @prop {CssValue} text-align [center] Alignment of text within hero.
|
|
32
|
+
/// @prop {Color} background-color ["color-hero-background"] Background color of the hero
|
|
33
|
+
|
|
34
|
+
$config: (
|
|
35
|
+
"background-color" : "background-gray",
|
|
36
|
+
"padding-top": 3rem,
|
|
37
|
+
"padding-bottom" : 2rem,
|
|
38
|
+
"gap" : (4rem 2rem),
|
|
39
|
+
"main-max-width" : true,
|
|
40
|
+
"main-min-width" : true,
|
|
41
|
+
"media-max-width" : 20rem,
|
|
42
|
+
"media-vertical-align" : center
|
|
43
|
+
) !default;
|
|
44
|
+
|
|
45
|
+
/// Change modules $config
|
|
46
|
+
/// @param {Map} $changes Map of changes
|
|
47
|
+
/// @example scss
|
|
48
|
+
/// @include ulu.component-basic-hero-set(( "property" : value ));
|
|
49
|
+
|
|
50
|
+
@mixin set($changes) {
|
|
51
|
+
$config: map.merge($config, $changes) !global;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/// Get a config option
|
|
55
|
+
/// @param {Map} $name Name of property
|
|
56
|
+
/// @example scss
|
|
57
|
+
/// @include ulu.component-basic-hero-get("property");
|
|
58
|
+
|
|
59
|
+
@function get($name) {
|
|
60
|
+
$value: utils.require-map-get($config, $name, "basic-hero [config]");
|
|
61
|
+
@return utils.function-fallback($name, $value, $-fallbacks);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/// Prints component styles
|
|
65
|
+
/// @example scss
|
|
66
|
+
/// @include ulu.component-basic-hero-styles();
|
|
67
|
+
|
|
68
|
+
@mixin styles {
|
|
69
|
+
$prefix: selector.class("basic-hero");
|
|
70
|
+
|
|
71
|
+
#{ $prefix } {
|
|
72
|
+
background-color: color.get(get("background-color"));
|
|
73
|
+
}
|
|
74
|
+
#{ $prefix }__content {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: stretch;
|
|
77
|
+
flex-wrap: wrap;
|
|
78
|
+
justify-content: space-between;
|
|
79
|
+
gap: get("gap");
|
|
80
|
+
padding-top: get("padding-top");
|
|
81
|
+
padding-bottom: get("padding-bottom");
|
|
82
|
+
}
|
|
83
|
+
#{ $prefix }__content-main {
|
|
84
|
+
$min-width: if(get("main-min-width"), get("main-min-width"), get("main-max-width"));
|
|
85
|
+
// Using max/min-width so that we don't need to add selectors to change flex-basis
|
|
86
|
+
// when centered. Using flex-basis: 0 to allow flexbox to decide the items width
|
|
87
|
+
// allows it to expand/shrink within. min(100%... Never larger than parent
|
|
88
|
+
min-width: min(100%, $min-width);
|
|
89
|
+
max-width: get("main-max-width");
|
|
90
|
+
flex-shrink: 1;
|
|
91
|
+
flex-grow: 1;
|
|
92
|
+
flex-basis: 0;
|
|
93
|
+
}
|
|
94
|
+
#{ $prefix }__content-media {
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
align-self: get("media-vertical-align");
|
|
98
|
+
justify-content: center;
|
|
99
|
+
flex: 0 0 auto;
|
|
100
|
+
width: min(100%, get("media-max-width"));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Modifiers
|
|
104
|
+
#{ $prefix }--center {
|
|
105
|
+
#{ $prefix }__content {
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
flex-wrap: nowrap;
|
|
108
|
+
text-align: center;
|
|
109
|
+
align-items: center;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
@use "../utils";
|
|
10
10
|
@use "../color";
|
|
11
11
|
@use "../element";
|
|
12
|
+
@use "../selector";
|
|
13
|
+
@use "../button";
|
|
12
14
|
|
|
13
15
|
// Used for function fallback
|
|
14
16
|
$-fallbacks: (
|
|
@@ -23,6 +25,14 @@ $-fallbacks: (
|
|
|
23
25
|
"box-shadow-hover" : (
|
|
24
26
|
"function" : meta.get-function("get", false, "element"),
|
|
25
27
|
"property" : "box-shadow-hover"
|
|
28
|
+
),
|
|
29
|
+
"border-color" : (
|
|
30
|
+
"function" : meta.get-function("get", false, "button"),
|
|
31
|
+
"property" : "border-color"
|
|
32
|
+
),
|
|
33
|
+
"border-width" : (
|
|
34
|
+
"function" : meta.get-function("get", false, "button"),
|
|
35
|
+
"property" : "border-width"
|
|
26
36
|
)
|
|
27
37
|
);
|
|
28
38
|
|
|
@@ -31,11 +41,14 @@ $-fallbacks: (
|
|
|
31
41
|
/// @prop {Color} background-color [white] Background color for the button.
|
|
32
42
|
/// @prop {Color} background-color-hover [link] Background color for the button when hovered or focused.
|
|
33
43
|
/// @prop {String} border-radius [border-radius] Border radius of the button.
|
|
44
|
+
/// @prop {String} border-width [null] Border width (or set to true to inherit button border width default)
|
|
45
|
+
/// @prop {String} border-color [null] Border color (or set to true to inherit button border width default)
|
|
34
46
|
/// @prop {CssValue} box-shadow [true] Box shadow for the button. If set to true, uses default box-shadow.
|
|
35
47
|
/// @prop {CssValue} box-shadow-hover [true] Box shadow for the button when hovered or focused. If set to true, uses default box-shadow-hover.
|
|
36
48
|
/// @prop {String} color [type] Text color for the button.
|
|
37
49
|
/// @prop {String} color-hover [type] Text color for the button when hovered or focused.
|
|
38
50
|
/// @prop {Color} icon-color [gray] Color for button icons.
|
|
51
|
+
/// @prop {Color} icon-color-hover [null] Optional color for icon when hovered
|
|
39
52
|
/// @prop {Dimension} icon-font-size [1.25rem] Font size for the button.
|
|
40
53
|
/// @prop {Number} line-height [1.2] Line height for button text.
|
|
41
54
|
/// @prop {Dimension} margin [1em] Margin for the button.
|
|
@@ -46,26 +59,44 @@ $-fallbacks: (
|
|
|
46
59
|
/// @prop {String} title-color [link] Color of the title of the button.
|
|
47
60
|
/// @prop {String} title-color-hover [link-hover] Color of the title of the button when hovered or focused.
|
|
48
61
|
/// @prop {Dimension} title-margin [0.5em] Margin for the button's title.
|
|
62
|
+
/// @prop {Boolean} cap [false] Enable left cap style
|
|
63
|
+
/// @prop {Color} cap-side ["left"] The side that gets the cap
|
|
64
|
+
/// @prop {Number} cap-match-radius [true] The cap should have be rounded to match the parent's border radius
|
|
65
|
+
/// @prop {Map} cap-options The options for cap (see element.cap for options)
|
|
66
|
+
/// @prop {Map} cap-options-hover The options for cap when hovered
|
|
49
67
|
|
|
50
68
|
$config: (
|
|
51
69
|
"background-color" : white,
|
|
52
|
-
"background-color-hover" :
|
|
53
|
-
"border-radius" :
|
|
70
|
+
"background-color-hover" : #F7F8F7,
|
|
71
|
+
"border-radius" : true,
|
|
72
|
+
"border-color" : null,
|
|
73
|
+
"border-width" : null,
|
|
54
74
|
"box-shadow" : true,
|
|
55
75
|
"box-shadow-hover" : true,
|
|
56
76
|
"color" : "type",
|
|
57
77
|
"color-hover" : "type",
|
|
58
78
|
"icon-color": gray,
|
|
79
|
+
"icon-color-hover": null,
|
|
59
80
|
"icon-font-size" : 1.25rem,
|
|
60
81
|
"line-height" : 1.2,
|
|
61
82
|
"margin" : 1em,
|
|
62
83
|
"margin-inline" : 0.75em,
|
|
63
84
|
"min-width": 20rem,
|
|
64
|
-
"padding-x": 0.
|
|
85
|
+
"padding-x": 0.75em,
|
|
65
86
|
"padding-y": 1em,
|
|
66
87
|
"title-color": "link",
|
|
67
88
|
"title-margin" : 0.5em,
|
|
68
89
|
"title-color-hover" : "link-hover",
|
|
90
|
+
"cap" : false,
|
|
91
|
+
"cap-side" : "left",
|
|
92
|
+
"cap-match-radius" : true,
|
|
93
|
+
"cap-options" : (
|
|
94
|
+
"color" : "link",
|
|
95
|
+
"size" : 0.5rem,
|
|
96
|
+
),
|
|
97
|
+
"cap-options-hover" : (
|
|
98
|
+
"color" : "link-hover"
|
|
99
|
+
),
|
|
69
100
|
) !default;
|
|
70
101
|
|
|
71
102
|
/// Change modules $config
|
|
@@ -89,50 +120,101 @@ $config: (
|
|
|
89
120
|
|
|
90
121
|
/// Prints component styles
|
|
91
122
|
/// @example scss
|
|
92
|
-
///
|
|
123
|
+
/// @include ulu.component-button-verbose-styles();
|
|
124
|
+
/// @example html {preview} - Basic Example
|
|
125
|
+
/// <a href="#" class="button-verbose">
|
|
126
|
+
/// <strong class="button-verbose__title">Example Link</strong>
|
|
127
|
+
/// <span class="button-verbose__body">This is the body</span>
|
|
128
|
+
/// <span class="button-verbose__icon fas fa-arrow-right" aria-hidden="true"></span>
|
|
129
|
+
/// </a>
|
|
93
130
|
|
|
94
131
|
@mixin styles {
|
|
95
|
-
.button-verbose
|
|
132
|
+
$prefix: selector.class("button-verbose");
|
|
133
|
+
$padding-x: get("padding-x");
|
|
134
|
+
$padding-y: get("padding-y");
|
|
135
|
+
$padding-right: ($padding-x * 2) + 1em;
|
|
136
|
+
$cap-side: get("cap-side");
|
|
137
|
+
$cap-defaults: (
|
|
138
|
+
"offset" : utils.if-type("number", get("border-width"), 0),
|
|
139
|
+
"border-radius" : if(get("cap-match-radius"), get("border-radius"), 0),
|
|
140
|
+
"padding-adjust" : if(utils.is-side($cap-side), $padding-x, $padding-y)
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
#{ $prefix } {
|
|
144
|
+
position: relative; // For cap and icon
|
|
145
|
+
display: block;
|
|
96
146
|
text-decoration: none;
|
|
97
|
-
border-radius:
|
|
147
|
+
border-radius: get("border-radius");
|
|
148
|
+
@if (get("border-width")) {
|
|
149
|
+
border: get("border-width") solid color.get(get("border-color"));
|
|
150
|
+
}
|
|
98
151
|
box-shadow: get("box-shadow");
|
|
99
152
|
line-height: get("line-height");
|
|
100
|
-
position: relative;
|
|
101
|
-
display: block;
|
|
102
153
|
margin-bottom: get("margin");
|
|
103
154
|
max-width: 100%;
|
|
104
155
|
width: get("min-width");
|
|
105
156
|
background-color: color.get(get("background-color"));
|
|
106
|
-
padding:
|
|
107
|
-
padding-right: (get("padding-x") * 2) + 1em;
|
|
157
|
+
padding: $padding-y $padding-right $padding-y $padding-x;
|
|
108
158
|
color: color.get(get("color"));
|
|
159
|
+
text-align: left;
|
|
160
|
+
|
|
109
161
|
&:hover {
|
|
110
162
|
color: color.get(get("color-hover"));
|
|
111
163
|
background-color: color.get(get("background-color-hover"));
|
|
112
164
|
box-shadow: get("box-shadow-hover");
|
|
113
|
-
|
|
114
|
-
|
|
165
|
+
@if get("title-color-hover") {
|
|
166
|
+
#{ $prefix }__title {
|
|
167
|
+
color: color.get(get("title-color-hover"));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
@if get("icon-color-hover") {
|
|
171
|
+
#{ $prefix }__icon {
|
|
172
|
+
color: color.get(get("icon-color-hover"));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
@if get("cap") {
|
|
177
|
+
@include element.cap(
|
|
178
|
+
$side: $cap-side,
|
|
179
|
+
$options: map.merge($cap-defaults, get("cap-options"))
|
|
180
|
+
);
|
|
181
|
+
@if get("cap-options-hover") {
|
|
182
|
+
&:hover,
|
|
183
|
+
&:focus {
|
|
184
|
+
@include element.cap-appearance(
|
|
185
|
+
$side: $cap-side,
|
|
186
|
+
$options: get("cap-options-hover")
|
|
187
|
+
);
|
|
188
|
+
}
|
|
115
189
|
}
|
|
116
190
|
}
|
|
117
191
|
}
|
|
118
|
-
|
|
192
|
+
#{ $prefix }__title,
|
|
193
|
+
#{ $prefix }__body {
|
|
119
194
|
display: block;
|
|
120
|
-
|
|
195
|
+
&:first-child {
|
|
196
|
+
margin-bottom: get("title-margin");
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
#{ $prefix }__title {
|
|
121
200
|
color: color.get(get("title-color"));
|
|
122
201
|
}
|
|
123
|
-
|
|
202
|
+
#{ $prefix }__icon {
|
|
124
203
|
position: absolute;
|
|
125
204
|
top: 50%;
|
|
126
|
-
right:
|
|
205
|
+
right: $padding-x;
|
|
127
206
|
transform: translateY(-50%);
|
|
128
207
|
font-size: get("icon-font-size");
|
|
129
208
|
color: color.get(get("icon-color"));
|
|
130
209
|
}
|
|
131
|
-
|
|
210
|
+
#{ $prefix }--inline {
|
|
132
211
|
display: inline-block;
|
|
133
212
|
margin-right: get("margin-inline");
|
|
213
|
+
&:last-child {
|
|
214
|
+
margin-right: 0;
|
|
215
|
+
}
|
|
134
216
|
}
|
|
135
|
-
|
|
217
|
+
#{ $prefix }--full-width {
|
|
136
218
|
width: 100%;
|
|
137
219
|
}
|
|
138
220
|
}
|