@codecademy/gamut-styles 17.14.0 → 17.14.1-alpha.05003b.0
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/core/index.scss +0 -1
- package/package.json +2 -2
- package/utils/index.scss +0 -4
- package/utils/variables/_typography.scss +6 -6
- package/utils/variables/index.scss +0 -2
- package/core/_typography.scss +0 -36
- package/utils/functions/index.scss +0 -26
- package/utils/mixins/_font-smoothing.scss +0 -9
- package/utils/mixins/_no-select.scss +0 -4
- package/utils/mixins/_responsive.scss +0 -85
- package/utils/mixins/_shadow.scss +0 -19
- package/utils/mixins/_sr-only.scss +0 -37
- package/utils/mixins/index.scss +0 -6
- package/utils/mixins/legacy.scss +0 -48
- package/utils/variables/_grid.scss +0 -15
- package/utils/variables/_responsive.scss +0 -1
- package/utils/variables/index.js +0 -8
package/core/index.scss
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/gamut-styles",
|
|
3
3
|
"description": "Styleguide & Component library for codecademy.com",
|
|
4
|
-
"version": "17.14.0",
|
|
4
|
+
"version": "17.14.1-alpha.05003b.0",
|
|
5
5
|
"author": "Jake Hiller <jake@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@codecademy/variance": "0.26.
|
|
7
|
+
"@codecademy/variance": "0.26.2-alpha.05003b.0",
|
|
8
8
|
"@emotion/is-prop-valid": "^1.1.0",
|
|
9
9
|
"framer-motion": "^11.18.0",
|
|
10
10
|
"get-nonce": "^1.0.0",
|
package/utils/index.scss
CHANGED
|
@@ -47,10 +47,10 @@ $line-height-headings: 1.1;
|
|
|
47
47
|
// Font sizes
|
|
48
48
|
|
|
49
49
|
$font-size-base: base.$base-unit;
|
|
50
|
-
$font-size-h1:
|
|
51
|
-
$font-size-h2:
|
|
52
|
-
$font-size-h3:
|
|
53
|
-
$font-size-h4:
|
|
54
|
-
$font-size-h5:
|
|
55
|
-
$font-size-h6:
|
|
50
|
+
$font-size-h1: 4rem;
|
|
51
|
+
$font-size-h2: 2.75rem;
|
|
52
|
+
$font-size-h3: 2.125rem;
|
|
53
|
+
$font-size-h4: 1.625rem;
|
|
54
|
+
$font-size-h5: 1.375rem;
|
|
55
|
+
$font-size-h6: 1.25rem;
|
|
56
56
|
$font-size-small: 85%;
|
package/core/_typography.scss
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// https://raw.githubusercontent.com/twbs/bootstrap/v4-dev/scss/_type.scss
|
|
2
|
-
|
|
3
|
-
h1,
|
|
4
|
-
h2,
|
|
5
|
-
h3,
|
|
6
|
-
h4,
|
|
7
|
-
h5,
|
|
8
|
-
h6 {
|
|
9
|
-
margin-bottom: $margin-bottom-headings;
|
|
10
|
-
font-weight: $font-weight-headings;
|
|
11
|
-
line-height: $line-height-headings;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
h1 {
|
|
15
|
-
font-size: $font-size-h1;
|
|
16
|
-
}
|
|
17
|
-
h2 {
|
|
18
|
-
font-size: $font-size-h2;
|
|
19
|
-
}
|
|
20
|
-
h3 {
|
|
21
|
-
font-size: $font-size-h3;
|
|
22
|
-
}
|
|
23
|
-
h4 {
|
|
24
|
-
font-size: $font-size-h4;
|
|
25
|
-
}
|
|
26
|
-
h5 {
|
|
27
|
-
font-size: $font-size-h5;
|
|
28
|
-
}
|
|
29
|
-
h6 {
|
|
30
|
-
font-size: $font-size-h6;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
small {
|
|
34
|
-
font-size: $font-size-small;
|
|
35
|
-
font-weight: $font-weight-normal;
|
|
36
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
@use "sass:math";
|
|
2
|
-
|
|
3
|
-
@function strip-units($number) {
|
|
4
|
-
@return math.div($number, ($number * 0 + 1));
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
@function px-rem($px, $base-px: 16) {
|
|
8
|
-
@return calc(strip-units($px) / strip-units($base-px)) * 1rem;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@function px-em($px, $base-px: 16) {
|
|
12
|
-
@return calc(strip-units($px) / strip-units($base-px)) * 1em;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Math
|
|
16
|
-
@function pow($number, $exponent) {
|
|
17
|
-
$value: 1;
|
|
18
|
-
|
|
19
|
-
@if $exponent > 0 {
|
|
20
|
-
@for $i from 1 through $exponent {
|
|
21
|
-
$value: $value * $number;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@return $value;
|
|
26
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
// Try to use these simple mixins if possible for your responsive needs
|
|
2
|
-
@use "../variables/grid" as *;
|
|
3
|
-
|
|
4
|
-
// Example usage:
|
|
5
|
-
//
|
|
6
|
-
// .grid {
|
|
7
|
-
// display: flex;
|
|
8
|
-
// flex-direction: column;
|
|
9
|
-
// @include md-viewport {
|
|
10
|
-
// flex-direction: row;
|
|
11
|
-
// }
|
|
12
|
-
// }
|
|
13
|
-
|
|
14
|
-
@mixin sm-viewport {
|
|
15
|
-
@media only screen and (min-width: $grid-sm-min) {
|
|
16
|
-
@content;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@mixin md-viewport {
|
|
21
|
-
@media only screen and (min-width: $grid-md-min) {
|
|
22
|
-
@content;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@mixin lg-viewport {
|
|
27
|
-
@media only screen and (min-width: $grid-lg-min) {
|
|
28
|
-
@content;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@mixin xl-viewport {
|
|
33
|
-
@media only screen and (min-width: $grid-xl-min) {
|
|
34
|
-
@content;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Media query abstractions if you need more complex responsive behavior
|
|
39
|
-
// or custom breakpoints
|
|
40
|
-
|
|
41
|
-
@mixin screen-size-lte($max) {
|
|
42
|
-
@media screen and (max-width: $max) {
|
|
43
|
-
@content;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@mixin screen-size-between($min, $max) {
|
|
48
|
-
@media screen and (min-width: $min) and (max-width: $max) {
|
|
49
|
-
@content;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@mixin screen-size-gte($min) {
|
|
54
|
-
@media screen and (min-width: $min) {
|
|
55
|
-
@content;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Named view port mixin
|
|
60
|
-
|
|
61
|
-
@mixin getViewport($viewport) {
|
|
62
|
-
@if $viewport == "xl" {
|
|
63
|
-
@include xl-viewport() {
|
|
64
|
-
@content;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
@if $viewport == "lg" {
|
|
68
|
-
@include lg-viewport {
|
|
69
|
-
@content;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
@if $viewport == "md" {
|
|
73
|
-
@include md-viewport {
|
|
74
|
-
@content;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
@if $viewport == "sm" {
|
|
78
|
-
@include sm-viewport {
|
|
79
|
-
@content;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
@if $viewport == "xs" {
|
|
83
|
-
@content;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// depth based box-shadows
|
|
2
|
-
|
|
3
|
-
@mixin shadow($depth: 1) {
|
|
4
|
-
@if $depth == 1 {
|
|
5
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
|
|
6
|
-
}
|
|
7
|
-
@if $depth == 2 {
|
|
8
|
-
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
|
9
|
-
}
|
|
10
|
-
@if $depth == 3 {
|
|
11
|
-
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
|
|
12
|
-
}
|
|
13
|
-
@if $depth == 4 {
|
|
14
|
-
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
|
15
|
-
}
|
|
16
|
-
@if $depth == 5 {
|
|
17
|
-
box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// shamelessly stolen from bootstrap
|
|
2
|
-
// https://github.com/twbs/bootstrap/blob/2085c142679563189dbc34ec6bf4b00e32b8f615/scss/mixins/_screen-reader.scss
|
|
3
|
-
|
|
4
|
-
@mixin screenreader-only {
|
|
5
|
-
position: absolute;
|
|
6
|
-
width: 1px;
|
|
7
|
-
height: 1px;
|
|
8
|
-
padding: 0;
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
clip: rect(0, 0, 0, 0);
|
|
11
|
-
white-space: nowrap;
|
|
12
|
-
clip-path: inset(50%);
|
|
13
|
-
border: 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@mixin sr-only {
|
|
17
|
-
@warn "This is deprecated, please use screenreader-only";
|
|
18
|
-
@include screenreader-only;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@mixin screenreader-only-focusable {
|
|
22
|
-
&:active,
|
|
23
|
-
&:focus {
|
|
24
|
-
position: static;
|
|
25
|
-
width: auto;
|
|
26
|
-
height: auto;
|
|
27
|
-
overflow: visible;
|
|
28
|
-
clip: auto;
|
|
29
|
-
white-space: normal;
|
|
30
|
-
clip-path: none;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@mixin sr-only-focusable {
|
|
35
|
-
@warn "This is deprecated, please use screenreader-only-focusable";
|
|
36
|
-
@include screenreader-only-focusable;
|
|
37
|
-
}
|
package/utils/mixins/index.scss
DELETED
package/utils/mixins/legacy.scss
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// Legacy Helper mixins
|
|
2
|
-
@use "../variables/index.scss";
|
|
3
|
-
@use "../mixins/responsive" as *;
|
|
4
|
-
|
|
5
|
-
// these variables should be located in ../variables
|
|
6
|
-
// instead, they're co-located with their legacy functions so they can be removed more easily
|
|
7
|
-
// NOTE: when removing, also remove the legacyBreakpoints JS object in gamut-styles/variables.js
|
|
8
|
-
$bp-phone: 0;
|
|
9
|
-
$bp-tablet: 736px;
|
|
10
|
-
$bp-desktop: 960px;
|
|
11
|
-
|
|
12
|
-
@mixin device-phone {
|
|
13
|
-
@include screen-size-between($bp-phone, $bp-tablet - 1) {
|
|
14
|
-
@content;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@mixin device-tablet {
|
|
19
|
-
@include screen-size-between($bp-tablet, $bp-desktop - 1) {
|
|
20
|
-
@content;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@mixin device-desktop {
|
|
25
|
-
@include screen-size-gte($bp-desktop) {
|
|
26
|
-
@content;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@mixin devices($devices...) {
|
|
31
|
-
@each $device in $devices {
|
|
32
|
-
@if $device == phone {
|
|
33
|
-
@include device-phone {
|
|
34
|
-
@content;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
@if $device == tablet {
|
|
38
|
-
@include device-tablet {
|
|
39
|
-
@content;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
@if $device == desktop {
|
|
43
|
-
@include device-desktop {
|
|
44
|
-
@content;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Overrides for the Grid component
|
|
2
|
-
@use "../functions/index.scss" as *;
|
|
3
|
-
|
|
4
|
-
// NOTE: When updating, make sure you also update the gamut-styles/variables.js file
|
|
5
|
-
|
|
6
|
-
$max-content-width: 1440px;
|
|
7
|
-
|
|
8
|
-
$grid-cols: 12;
|
|
9
|
-
$grid-gutter-width: px-rem(16);
|
|
10
|
-
$grid-outer-margin: px-rem(16);
|
|
11
|
-
$grid-xs-min: px-rem(480);
|
|
12
|
-
$grid-sm-min: px-rem(768);
|
|
13
|
-
$grid-md-min: px-rem(1024);
|
|
14
|
-
$grid-lg-min: px-rem(1200);
|
|
15
|
-
$grid-xl-min: px-rem($max-content-width);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
$screenSizes: ("xs", "sm", "md", "lg", "xl");
|
package/utils/variables/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
if (process.env.NODE_ENV === 'development') {
|
|
2
|
-
// eslint-disable-next-line no-console
|
|
3
|
-
console.warn(
|
|
4
|
-
'Importing from `gamut-styles/utils/variables` is now deprecated, please import directly from the gamut-styles package'
|
|
5
|
-
);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export * from '../../dist/variables';
|