@graupl/graupl 1.0.0-alpha.11 → 1.0.0-alpha.13
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 +54 -0
- package/dist/base/button.css +2 -0
- package/dist/base/button.css.map +1 -0
- package/dist/base/form.css +1 -1
- package/dist/base/form.css.map +1 -1
- package/dist/base/link.css +1 -1
- package/dist/base/link.css.map +1 -1
- package/dist/base/table.css +1 -1
- package/dist/base/table.css.map +1 -1
- package/dist/base.css +1 -1
- package/dist/base.css.map +1 -1
- package/dist/component/card.css +2 -0
- package/dist/component/card.css.map +1 -0
- package/dist/component/input-group.css +1 -1
- package/dist/component/input-group.css.map +1 -1
- package/dist/component/menu.css +2 -0
- package/dist/component/menu.css.map +1 -0
- package/dist/component/navigation.css +2 -0
- package/dist/component/navigation.css.map +1 -0
- package/dist/component.css +1 -1
- package/dist/component.css.map +1 -1
- package/dist/graupl.css +1 -1
- package/dist/graupl.css.map +1 -1
- package/dist/init.css +2 -0
- package/dist/init.css.map +1 -0
- package/dist/layout/columns.css +1 -1
- package/dist/layout/columns.css.map +1 -1
- package/dist/layout/container.css.map +1 -1
- package/dist/layout/flex-columns.css +2 -0
- package/dist/layout/flex-columns.css.map +1 -0
- package/dist/layout.css +1 -1
- package/dist/layout.css.map +1 -1
- package/dist/normalize.css +2 -0
- package/dist/normalize.css.map +1 -0
- package/dist/state/focus.css.map +1 -1
- package/dist/state.css.map +1 -1
- package/dist/theme/color.css.map +1 -1
- package/dist/theme/typography.css +1 -1
- package/dist/theme/typography.css.map +1 -1
- package/dist/theme.css +1 -1
- package/dist/theme.css.map +1 -1
- package/dist/utilities/order.css +2 -0
- package/dist/utilities/order.css.map +1 -0
- package/dist/utilities/spacing.css +1 -1
- package/dist/utilities/spacing.css.map +1 -1
- package/dist/utilities/typography.css +1 -1
- package/dist/utilities/typography.css.map +1 -1
- package/dist/utilities.css +1 -1
- package/dist/utilities.css.map +1 -1
- package/eslint.config.js +1 -0
- package/index.html +619 -326
- package/package.json +2 -1
- package/scss/base/button.scss +3 -0
- package/scss/base/form.scss +1 -1
- package/scss/base/link.scss +1 -1
- package/scss/base/table.scss +1 -1
- package/scss/base.scss +1 -1
- package/scss/component/card.scss +3 -0
- package/scss/component/input-group.scss +1 -1
- package/scss/component/menu.scss +3 -0
- package/scss/component/navigation.scss +3 -0
- package/scss/component.scss +1 -1
- package/scss/graupl.scss +1 -3
- package/scss/init.scss +3 -0
- package/scss/layout/columns.scss +1 -1
- package/scss/layout/container.scss +1 -1
- package/scss/layout/flex-columns.scss +3 -0
- package/scss/layout.scss +1 -1
- package/scss/normalize.scss +3 -0
- package/scss/state/focus.scss +1 -1
- package/scss/state.scss +1 -1
- package/scss/theme/color.scss +1 -1
- package/scss/theme/typography.scss +1 -1
- package/scss/theme.scss +1 -1
- package/scss/utilities/alignment.scss +1 -1
- package/scss/utilities/color.scss +1 -1
- package/scss/utilities/display.scss +1 -1
- package/scss/utilities/flex.scss +1 -1
- package/scss/utilities/inset.scss +1 -1
- package/scss/utilities/justification.scss +1 -1
- package/scss/utilities/list.scss +1 -1
- package/scss/utilities/order.scss +3 -0
- package/scss/utilities/postion.scss +1 -1
- package/scss/utilities/spacing.scss +1 -1
- package/scss/utilities/typography.scss +1 -1
- package/scss/utilities/visibility.scss +1 -1
- package/scss/utilities.scss +1 -1
- package/src/js/navigation.js +34 -0
- package/src/scss/_defaults.scss +21 -5
- package/src/scss/_index.scss +4 -3
- package/src/scss/_init.scss +2 -2
- package/src/scss/_normalize.scss +197 -0
- package/src/scss/_variables.scss +4 -1
- package/src/scss/base/_index.scss +2 -1
- package/src/scss/base/button/_defaults.scss +53 -0
- package/src/scss/base/button/_index.scss +210 -0
- package/src/scss/{component → base}/button/_variables.scss +51 -12
- package/src/scss/base/form/_defaults.scss +14 -4
- package/src/scss/base/form/_index.scss +23 -20
- package/src/scss/base/form/_variables.scss +12 -1
- package/src/scss/base/link/_defaults.scss +48 -5
- package/src/scss/base/link/_index.scss +101 -17
- package/src/scss/base/link/_variables.scss +226 -5
- package/src/scss/base/table/_defaults.scss +49 -4
- package/src/scss/base/table/_index.scss +102 -8
- package/src/scss/base/table/_variables.scss +71 -1
- package/src/scss/component/_index.scss +4 -3
- package/src/scss/component/card/_defaults.scss +29 -0
- package/src/scss/component/card/_index.scss +143 -0
- package/src/scss/component/card/_variables.scss +185 -0
- package/src/scss/component/input-group/_defaults.scss +11 -4
- package/src/scss/component/input-group/_index.scss +11 -9
- package/src/scss/component/input-group/_variables.scss +4 -1
- package/src/scss/component/menu/_defaults.scss +65 -0
- package/src/scss/component/menu/_index.scss +304 -0
- package/src/scss/component/menu/_variables.scss +491 -0
- package/src/scss/component/navigation/_defaults.scss +29 -0
- package/src/scss/component/navigation/_index.scss +189 -0
- package/src/scss/component/navigation/_variables.scss +237 -0
- package/src/scss/functions/_important.scss +2 -0
- package/src/scss/functions/_theme.scss +18 -0
- package/src/scss/layout/_index.scss +2 -1
- package/src/scss/layout/columns/_defaults.scss +12 -4
- package/src/scss/layout/columns/_index.scss +27 -5
- package/src/scss/layout/columns/_variables.scss +4 -1
- package/src/scss/layout/container/_defaults.scss +13 -4
- package/src/scss/layout/container/_index.scss +12 -7
- package/src/scss/layout/container/_variables.scss +4 -1
- package/src/scss/layout/flex-columns/_defaults.scss +18 -0
- package/src/scss/layout/flex-columns/_index.scss +77 -0
- package/src/scss/layout/flex-columns/_variables.scss +26 -0
- package/src/scss/mixins/_layer.scss +1 -1
- package/src/scss/mixins/_media-queries.scss +10 -1
- package/src/scss/state/_index.scss +1 -1
- package/src/scss/state/focus/_defaults.scss +6 -4
- package/src/scss/state/focus/_index.scss +1 -1
- package/src/scss/state/focus/_variables.scss +4 -1
- package/src/scss/theme/_index.scss +1 -1
- package/src/scss/theme/color/_defaults.scss +6 -4
- package/src/scss/theme/color/_index.scss +1 -1
- package/src/scss/theme/color/_variables.scss +4 -1
- package/src/scss/theme/typography/_defaults.scss +7 -5
- package/src/scss/theme/typography/_index.scss +1 -1
- package/src/scss/theme/typography/_variables.scss +9 -3
- package/src/scss/utilities/_index.scss +3 -1
- package/src/scss/utilities/alignment/_defaults.scss +6 -4
- package/src/scss/utilities/alignment/_index.scss +1 -1
- package/src/scss/utilities/alignment/_variables.scss +4 -1
- package/src/scss/utilities/color/_defaults.scss +6 -4
- package/src/scss/utilities/color/_index.scss +1 -1
- package/src/scss/utilities/color/_variables.scss +4 -1
- package/src/scss/utilities/display/_defaults.scss +6 -4
- package/src/scss/utilities/display/_index.scss +1 -1
- package/src/scss/utilities/display/_variables.scss +4 -1
- package/src/scss/utilities/flex/_defaults.scss +6 -4
- package/src/scss/utilities/flex/_index.scss +1 -1
- package/src/scss/utilities/flex/_variables.scss +4 -1
- package/src/scss/utilities/inset/_defaults.scss +6 -4
- package/src/scss/utilities/inset/_index.scss +1 -1
- package/src/scss/utilities/inset/_variables.scss +4 -1
- package/src/scss/utilities/justification/_defaults.scss +6 -4
- package/src/scss/utilities/justification/_index.scss +1 -1
- package/src/scss/utilities/justification/_variables.scss +4 -1
- package/src/scss/utilities/list/_defaults.scss +6 -4
- package/src/scss/utilities/list/_index.scss +1 -1
- package/src/scss/utilities/list/_variables.scss +4 -1
- package/src/scss/utilities/order/_defaults.scss +19 -0
- package/src/scss/utilities/order/_index.scss +35 -0
- package/src/scss/utilities/order/_variables.scss +6 -0
- package/src/scss/utilities/position/_defaults.scss +6 -4
- package/src/scss/utilities/position/_index.scss +1 -1
- package/src/scss/utilities/position/_variables.scss +4 -1
- package/src/scss/utilities/ratio/_defaults.scss +24 -0
- package/src/scss/utilities/ratio/_index.scss +26 -0
- package/src/scss/utilities/ratio/_variables.scss +9 -0
- package/src/scss/utilities/spacing/_defaults.scss +6 -4
- package/src/scss/utilities/spacing/_index.scss +41 -17
- package/src/scss/utilities/spacing/_variables.scss +4 -1
- package/src/scss/utilities/typography/_defaults.scss +6 -4
- package/src/scss/utilities/typography/_index.scss +1 -1
- package/src/scss/utilities/typography/_variables.scss +4 -1
- package/src/scss/utilities/visibility/_defaults.scss +6 -4
- package/src/scss/utilities/visibility/_index.scss +1 -1
- package/src/scss/utilities/visibility/_variables.scss +4 -1
- package/dist/component/button.css +0 -2
- package/dist/component/button.css.map +0 -1
- package/dist/component/table.css +0 -2
- package/dist/component/table.css.map +0 -1
- package/scss/component/button.scss +0 -3
- package/scss/component/table.scss +0 -3
- package/src/scss/component/button/_defaults.scss +0 -39
- package/src/scss/component/button/_index.scss +0 -134
- package/src/scss/component/table/_defaults.scss +0 -30
- package/src/scss/component/table/_index.scss +0 -77
- package/src/scss/component/table/_variables.scss +0 -64
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graupl/graupl",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.13",
|
|
4
4
|
"description": "A modular and modern CSS framework.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"globals": "^15.0.0",
|
|
57
57
|
"husky": "^9.0.11",
|
|
58
58
|
"lint-staged": "^15.2.2",
|
|
59
|
+
"normalize.css": "^8.0.1",
|
|
59
60
|
"postcss": "^8.4.38",
|
|
60
61
|
"postcss-cli": "^11.0.0",
|
|
61
62
|
"postcss-discard-comments": "^7.0.0",
|
package/scss/base/form.scss
CHANGED
package/scss/base/link.scss
CHANGED
package/scss/base/table.scss
CHANGED
package/scss/base.scss
CHANGED
package/scss/component.scss
CHANGED
package/scss/graupl.scss
CHANGED
package/scss/init.scss
ADDED
package/scss/layout/columns.scss
CHANGED
package/scss/layout.scss
CHANGED
package/scss/state/focus.scss
CHANGED
package/scss/state.scss
CHANGED
package/scss/theme/color.scss
CHANGED
package/scss/theme.scss
CHANGED
package/scss/utilities/flex.scss
CHANGED
package/scss/utilities/list.scss
CHANGED
package/scss/utilities.scss
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
document.addEventListener("DOMContentLoaded", function () {
|
|
2
|
+
const navs = document.querySelectorAll(".navigation");
|
|
3
|
+
const menus = [];
|
|
4
|
+
|
|
5
|
+
navs.forEach((nav) => {
|
|
6
|
+
const MenuConstructor = nav.dataset.grauplMenuType || DisclosureMenu;
|
|
7
|
+
|
|
8
|
+
if (window[MenuConstructor] === undefined) {
|
|
9
|
+
console.warn(
|
|
10
|
+
`Graupl navigation requires accessible-menu's ${MenuConstructor}. Please make sure to include it on this page.`
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const menuOptions =
|
|
17
|
+
JSON.parse(nav.dataset.grauplMenuOptions.replace(/'/g, '"')) || {};
|
|
18
|
+
const menuElement = nav.querySelector(".menu");
|
|
19
|
+
const controllerElement = nav.querySelector(".navigation-toggle");
|
|
20
|
+
const containerElement = nav;
|
|
21
|
+
const menu = new window[MenuConstructor]({
|
|
22
|
+
menuElement,
|
|
23
|
+
menuItemSelector: ".menu-item",
|
|
24
|
+
menuLinkSelector: ".menu-link",
|
|
25
|
+
submenuItemSelector: ".submenu-item",
|
|
26
|
+
submenuToggleSelector: ".submenu-toggle",
|
|
27
|
+
controllerElement,
|
|
28
|
+
containerElement,
|
|
29
|
+
...menuOptions,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
menus.push(menu);
|
|
33
|
+
});
|
|
34
|
+
});
|
package/src/scss/_defaults.scss
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
|
@@ -17,10 +19,24 @@ $content-max-width: 96ch !default;
|
|
|
17
19
|
|
|
18
20
|
// Screen sizes.
|
|
19
21
|
$base-screen-sizes: (
|
|
20
|
-
xs: "(
|
|
22
|
+
xs: "(width <= 48ch)",
|
|
23
|
+
sm: "(48ch < width)",
|
|
24
|
+
md: "(72ch < width)",
|
|
25
|
+
lg: "(108ch < width)",
|
|
26
|
+
xl: "(156ch < width)",
|
|
21
27
|
);
|
|
22
28
|
$custom-screen-sizes: () !default;
|
|
23
29
|
$screen-sizes: map.merge($base-screen-sizes, $custom-screen-sizes);
|
|
30
|
+
$base-screen-size-triggers: (
|
|
31
|
+
navigation-collapse: "(width <= 72ch)",
|
|
32
|
+
navigation-expand: "(72ch < width)",
|
|
33
|
+
force-vertical-card: "(width <= 72ch)",
|
|
34
|
+
);
|
|
35
|
+
$custom-screen-size-triggers: () !default;
|
|
36
|
+
$screen-size-triggers: map.merge(
|
|
37
|
+
$base-screen-size-triggers,
|
|
38
|
+
$custom-screen-size-triggers
|
|
39
|
+
);
|
|
24
40
|
|
|
25
41
|
// Spacing properties.
|
|
26
42
|
$spacer: 1rem !default;
|
package/src/scss/_index.scss
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// Forwards all components for easy development.
|
|
1
|
+
// @graupl/graupl styles.
|
|
4
2
|
|
|
5
3
|
// Forward the layer initialization.
|
|
6
4
|
@forward "init";
|
|
7
5
|
|
|
6
|
+
// Forward normalize.
|
|
7
|
+
@forward "normalize";
|
|
8
|
+
|
|
8
9
|
// Forward all layers.
|
|
9
10
|
@forward "base";
|
|
10
11
|
@forward "layout";
|
package/src/scss/_init.scss
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl layer initialization styles.
|
|
2
2
|
|
|
3
|
-
@layer graupl.base, graupl.layout, graupl.component, graupl.theme, graupl.utilities, graupl.state;
|
|
3
|
+
@layer graupl.normalize, graupl.base, graupl.layout, graupl.component, graupl.theme, graupl.utilities, graupl.state;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// @graupl/graupl normalize.
|
|
2
|
+
//
|
|
3
|
+
// This file is manually forked from normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
|
|
4
|
+
//
|
|
5
|
+
// We wanted to scope normalize.css to a normalize layer along with some customizations, so we forked it here.
|
|
6
|
+
//
|
|
7
|
+
// @use cannot be used in this file because you cannot insert it into a layer.
|
|
8
|
+
//
|
|
9
|
+
// @import would technically work, but it is not recommended by Sass and will eventually be removed.
|
|
10
|
+
// Using @import would cause headaches down the line, so a manual fork was the best option.
|
|
11
|
+
|
|
12
|
+
@use "mixins/layer" as *;
|
|
13
|
+
|
|
14
|
+
@include layer(normalize) {
|
|
15
|
+
// Correct box sizing of all elements to ensure everything is consistent.
|
|
16
|
+
*,
|
|
17
|
+
*::before,
|
|
18
|
+
*::after {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Document.
|
|
23
|
+
|
|
24
|
+
// 1. Correct the line height in all browsers.
|
|
25
|
+
// 2. Prevent adjustments of font size after orientation changes in iOS.
|
|
26
|
+
html {
|
|
27
|
+
line-height: 1.15; // 1.
|
|
28
|
+
text-size-adjust: 100%; // 2.
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Secions.
|
|
32
|
+
|
|
33
|
+
// Remove the margin in all browsers.
|
|
34
|
+
body {
|
|
35
|
+
margin: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Grouping content.
|
|
39
|
+
|
|
40
|
+
// Add the correct box sizing in Firefox.
|
|
41
|
+
hr {
|
|
42
|
+
box-sizing: content-box;
|
|
43
|
+
height: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// 1. Correct the inheritance and scaling of font size in all browsers.
|
|
47
|
+
// 2. Correct the odd `em` font sizing in all browsers.
|
|
48
|
+
pre {
|
|
49
|
+
font-family: monospace; // 1.
|
|
50
|
+
font-size: 1em; // 2.
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Text-level semantics.
|
|
54
|
+
|
|
55
|
+
// 1. Remove the bottom border in Chrome 57-
|
|
56
|
+
// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
|
57
|
+
abbr[title] {
|
|
58
|
+
border-bottom: 0; // 1.
|
|
59
|
+
text-decoration: underline dotted; // 2.
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Add the correct font weight in Chrome, Edge, and Safari.
|
|
63
|
+
b,
|
|
64
|
+
strong {
|
|
65
|
+
font-weight: bolder;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// 1. Correct the inheritance and scaling of font size in all browsers.
|
|
69
|
+
// 2. Correct the odd `em` font sizing in all browsers.
|
|
70
|
+
code,
|
|
71
|
+
kbd,
|
|
72
|
+
samp {
|
|
73
|
+
font-family: monospace; // 1.
|
|
74
|
+
font-size: 1em; // 2.
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Add the correct font size in all browsers.
|
|
78
|
+
small {
|
|
79
|
+
font-size: 80%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Prevent `sub` and `sup` elements from affecting the line height in all browsers.
|
|
83
|
+
sub,
|
|
84
|
+
sup {
|
|
85
|
+
position: relative;
|
|
86
|
+
font-size: 75%;
|
|
87
|
+
line-height: 0;
|
|
88
|
+
vertical-align: baseline;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
sub {
|
|
92
|
+
bottom: -0.25em;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
sup {
|
|
96
|
+
top: -0.5em;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Forms.
|
|
100
|
+
|
|
101
|
+
// 1. Change the font styles in all browsers.
|
|
102
|
+
// 2. Remove the margin in Firefox and Safari.
|
|
103
|
+
button,
|
|
104
|
+
input,
|
|
105
|
+
optgroup,
|
|
106
|
+
select,
|
|
107
|
+
textarea {
|
|
108
|
+
margin: 0; // 2.
|
|
109
|
+
font-family: inherit; // 1.
|
|
110
|
+
font-size: 100%; // 1.
|
|
111
|
+
line-height: 1.15; // 1.
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Remove the inheritance of text transform in Firefox.
|
|
115
|
+
button,
|
|
116
|
+
select {
|
|
117
|
+
/* 1 */
|
|
118
|
+
text-transform: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Correct the inability to style clickable types in iOS and Safari.
|
|
122
|
+
button,
|
|
123
|
+
[type="button"],
|
|
124
|
+
[type="reset"],
|
|
125
|
+
[type="submit"] {
|
|
126
|
+
appearance: button;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Remove the inner border and padding in Firefox.
|
|
130
|
+
button::-moz-focus-inner,
|
|
131
|
+
[type="button"]::-moz-focus-inner,
|
|
132
|
+
[type="reset"]::-moz-focus-inner,
|
|
133
|
+
[type="submit"]::-moz-focus-inner {
|
|
134
|
+
padding: 0;
|
|
135
|
+
border-style: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Restore the focus styles unset by the previous rule.
|
|
139
|
+
button:-moz-focusring,
|
|
140
|
+
[type="button"]:-moz-focusring,
|
|
141
|
+
[type="reset"]:-moz-focusring,
|
|
142
|
+
[type="submit"]:-moz-focusring {
|
|
143
|
+
outline: 1px dotted ButtonText;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Correct the padding in Firefox.
|
|
147
|
+
fieldset {
|
|
148
|
+
padding: 0.35em 0.75em 0.625em;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Remove the padding so developers are not caught out when they zero out `fieldset` elements in all browsers.
|
|
152
|
+
legend {
|
|
153
|
+
padding: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
|
157
|
+
progress {
|
|
158
|
+
vertical-align: baseline;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Correct the cursor style of increment and decrement buttons in Chrome.
|
|
162
|
+
[type="number"]::-webkit-inner-spin-button,
|
|
163
|
+
[type="number"]::-webkit-outer-spin-button {
|
|
164
|
+
height: auto;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// 1. Correct the odd appearance in Chrome and Safari.
|
|
168
|
+
// 2. Correct the outline style in Safari.
|
|
169
|
+
[type="search"] {
|
|
170
|
+
appearance: textfield; // 1.
|
|
171
|
+
outline-offset: -2px; // 2.
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Remove the inner padding in Chrome and Safari on macOS.
|
|
175
|
+
[type="search"]::-webkit-search-decoration {
|
|
176
|
+
appearance: none;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// 1. Correct the inability to style clickable types in iOS and Safari.
|
|
180
|
+
// 2. Change font properties to `inherit` in Safari.
|
|
181
|
+
::-webkit-file-upload-button {
|
|
182
|
+
appearance: button; /* 1 */
|
|
183
|
+
font: inherit; /* 2 */
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Interactive.
|
|
187
|
+
|
|
188
|
+
// Add the correct display in Edge, IE 10+, and Firefox.
|
|
189
|
+
details {
|
|
190
|
+
display: block;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Add the correct display in all browsers.
|
|
194
|
+
summary {
|
|
195
|
+
display: list-item;
|
|
196
|
+
}
|
|
197
|
+
}
|
package/src/scss/_variables.scss
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// @graupl/graupl button base default values.
|
|
2
|
+
//
|
|
3
|
+
// Generally, these should not be used directly when styling bases unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
8
|
+
|
|
9
|
+
@use "sass:map";
|
|
10
|
+
|
|
11
|
+
// Button selectors.
|
|
12
|
+
$button-selector: ".button" !default;
|
|
13
|
+
$button-link-selector: ".link" !default;
|
|
14
|
+
$button-theme-selector-prefix: "." !default;
|
|
15
|
+
|
|
16
|
+
// Button properties.
|
|
17
|
+
$button-transform: none !default;
|
|
18
|
+
$button-visited-transform: $button-transform !default;
|
|
19
|
+
$button-focus-transform: $button-transform !default;
|
|
20
|
+
$button-hover-transform: $button-transform !default;
|
|
21
|
+
$button-active-transform: scale(0.95) !default;
|
|
22
|
+
$button-disabled-transform: $button-transform !default;
|
|
23
|
+
|
|
24
|
+
// Button state theme defaults.
|
|
25
|
+
// This map is used to define the default colour shades for the
|
|
26
|
+
// themed button bases.
|
|
27
|
+
//
|
|
28
|
+
// e.g.
|
|
29
|
+
// Primary buttons will use primary--900 as the text colour, primary--100 as the background
|
|
30
|
+
// and primary--900 as the border colour.
|
|
31
|
+
//
|
|
32
|
+
// Secondary/tertiary buttons will use the same shade for their respective colours.
|
|
33
|
+
$base-button-state-theme-map: (
|
|
34
|
+
color: 900,
|
|
35
|
+
border-color: 700,
|
|
36
|
+
visited-color: 900,
|
|
37
|
+
visited-border-color: 700,
|
|
38
|
+
focus-color: 900,
|
|
39
|
+
focus-border-color: 700,
|
|
40
|
+
hover-color: 100,
|
|
41
|
+
hover-background: 700,
|
|
42
|
+
hover-border-color: 700,
|
|
43
|
+
active-color: 100,
|
|
44
|
+
active-background: 700,
|
|
45
|
+
active-border-color: 700,
|
|
46
|
+
disabled-color: 200,
|
|
47
|
+
disabled-border-color: 200,
|
|
48
|
+
);
|
|
49
|
+
$custom-button-state-theme-map: () !default;
|
|
50
|
+
$button-state-theme-map: map.merge(
|
|
51
|
+
$base-button-state-theme-map,
|
|
52
|
+
$custom-button-state-theme-map
|
|
53
|
+
);
|