gatsby-theme-carbon 2.1.4 → 2.1.5
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/package.json +1 -1
- package/src/components/ArticleCard/ArticleCard.js +8 -5
- package/src/components/ArticleCard/article-card.scss +12 -5
- package/src/components/Code/Code.module.scss +1 -1
- package/src/components/FeatureCard/feature-card.scss +0 -4
- package/src/components/FourOhFour/FourOhFour.module.scss +5 -5
- package/src/components/Homepage/Banner.js +1 -0
- package/src/components/Homepage/Callout.module.scss +1 -1
- package/src/components/Homepage/homepage.scss +3 -4
- package/src/components/MediumPosts/MediumPosts.module.scss +3 -20
- package/src/styles/internal/_page.scss +3 -7
package/package.json
CHANGED
|
@@ -45,9 +45,10 @@ export default class ArticleCard extends React.Component {
|
|
|
45
45
|
[`${prefix}--aspect-ratio--2x1`]
|
|
46
46
|
);
|
|
47
47
|
|
|
48
|
-
const
|
|
48
|
+
const cardContentClassNames = cx(
|
|
49
49
|
[`${prefix}--tile`],
|
|
50
|
-
[`${prefix}--tile--clickable`]
|
|
50
|
+
[`${prefix}--tile--clickable`],
|
|
51
|
+
[`${prefix}--article-card_content`]
|
|
51
52
|
);
|
|
52
53
|
|
|
53
54
|
const cardContent = (
|
|
@@ -101,16 +102,18 @@ export default class ArticleCard extends React.Component {
|
|
|
101
102
|
|
|
102
103
|
let cardContainer;
|
|
103
104
|
if (disabled === true) {
|
|
104
|
-
cardContainer =
|
|
105
|
+
cardContainer = (
|
|
106
|
+
<div className={cardContentClassNames}>{cardContent}</div>
|
|
107
|
+
);
|
|
105
108
|
} else if (isLink === true) {
|
|
106
109
|
cardContainer = (
|
|
107
|
-
<Link to={href} className={
|
|
110
|
+
<Link to={href} className={cardContentClassNames} {...rest}>
|
|
108
111
|
{cardContent}
|
|
109
112
|
</Link>
|
|
110
113
|
);
|
|
111
114
|
} else {
|
|
112
115
|
cardContainer = (
|
|
113
|
-
<a href={href} className={
|
|
116
|
+
<a href={href} className={cardContentClassNames} {...rest}>
|
|
114
117
|
{cardContent}
|
|
115
118
|
</a>
|
|
116
119
|
);
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.#{$prefix}--article-card:hover .#{$prefix}--
|
|
13
|
+
.#{$prefix}--article-card:hover .#{$prefix}--article-card__tile {
|
|
14
14
|
background: $hover-ui;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -43,6 +43,13 @@
|
|
|
43
43
|
@include carbon--type-style('caption-01');
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
// At the moment, we force 16:9 for medium posts, this
|
|
47
|
+
// is how we would force 16:9 for all article cards
|
|
48
|
+
//
|
|
49
|
+
// .#{$prefix}--article-card__img {
|
|
50
|
+
// aspect-ratio: 16 / 9;
|
|
51
|
+
// }
|
|
52
|
+
|
|
46
53
|
.#{$prefix}--article-card__img .gatsby-resp-image-wrapper {
|
|
47
54
|
margin-bottom: 0;
|
|
48
55
|
}
|
|
@@ -60,11 +67,11 @@
|
|
|
60
67
|
}
|
|
61
68
|
|
|
62
69
|
// Dark
|
|
63
|
-
.#{$prefix}--article-card--dark .#{$prefix}--
|
|
70
|
+
.#{$prefix}--article-card--dark .#{$prefix}--article-card__tile {
|
|
64
71
|
background: $carbon--gray-90; //$ui-background for gray 90 theme
|
|
65
72
|
}
|
|
66
73
|
|
|
67
|
-
.#{$prefix}--article-card--dark:hover .#{$prefix}--
|
|
74
|
+
.#{$prefix}--article-card--dark:hover .#{$prefix}--article-card__tile {
|
|
68
75
|
background: $carbon--gray-80; //$hover-ui for gray 90 theme
|
|
69
76
|
}
|
|
70
77
|
|
|
@@ -86,7 +93,7 @@
|
|
|
86
93
|
cursor: not-allowed;
|
|
87
94
|
}
|
|
88
95
|
|
|
89
|
-
.#{$prefix}--article-card--disabled .#{$prefix}--
|
|
96
|
+
.#{$prefix}--article-card--disabled .#{$prefix}--article-card__tile:hover {
|
|
90
97
|
background: $ui-01;
|
|
91
98
|
cursor: not-allowed;
|
|
92
99
|
}
|
|
@@ -105,7 +112,7 @@
|
|
|
105
112
|
|
|
106
113
|
// Disabled dark
|
|
107
114
|
.#{$prefix}--article-card--disabled.#{$prefix}--article-card--dark
|
|
108
|
-
.#{$prefix}--
|
|
115
|
+
.#{$prefix}--article-card__tile:hover {
|
|
109
116
|
background: $carbon--gray-90; //$ui-background for gray 90 theme
|
|
110
117
|
}
|
|
111
118
|
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
animation: gradient 2s ease infinite;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
:global(.container--dark) .link {
|
|
20
|
+
color: $carbon--gray-10;
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
.list .link {
|
|
20
24
|
@include carbon--type-style('body-short-02');
|
|
21
25
|
margin-bottom: $spacing-03;
|
|
@@ -43,10 +47,6 @@
|
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
49
|
|
|
46
|
-
:global(.container--dark) .link {
|
|
47
|
-
color: $carbon--gray-10;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
50
|
.paragraph {
|
|
51
51
|
@include carbon--type-style('body-long-01');
|
|
52
52
|
font-size: 1.25rem;
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
@include carbon--breakpoint('max') {
|
|
78
|
-
padding-left:
|
|
78
|
+
padding-left: 424px;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -72,13 +72,12 @@
|
|
|
72
72
|
margin: 0;
|
|
73
73
|
|
|
74
74
|
@include carbon--breakpoint('lg') {
|
|
75
|
-
padding-left: calc(
|
|
76
|
-
25% + 2rem
|
|
77
|
-
); //2rem to account for 2rem left padding default on grid
|
|
75
|
+
padding-left: calc(25% + 1.5rem);
|
|
78
76
|
}
|
|
79
77
|
|
|
80
78
|
@include carbon--breakpoint('max') {
|
|
81
|
-
padding-left:
|
|
79
|
+
padding-left: 424px;
|
|
80
|
+
padding-right: 0;
|
|
82
81
|
}
|
|
83
82
|
}
|
|
84
83
|
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
// Fixes the gutter of the article cards on the homepage
|
|
2
2
|
.card-container {
|
|
3
|
-
padding-right:
|
|
4
|
-
padding-left:
|
|
5
|
-
@include carbon--breakpoint('md') {
|
|
6
|
-
padding-right: 1rem;
|
|
7
|
-
padding-left: 1rem;
|
|
8
|
-
}
|
|
3
|
+
padding-right: 1rem;
|
|
4
|
+
padding-left: 1rem;
|
|
9
5
|
}
|
|
10
6
|
|
|
11
7
|
// Fixs the breaking type
|
|
@@ -40,18 +36,5 @@
|
|
|
40
36
|
|
|
41
37
|
.image {
|
|
42
38
|
object-fit: cover;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
@include carbon--breakpoint('sm') {
|
|
46
|
-
height: 315px;
|
|
47
|
-
}
|
|
48
|
-
@include carbon--breakpoint('md') {
|
|
49
|
-
height: 290px;
|
|
50
|
-
}
|
|
51
|
-
@include carbon--breakpoint('lg') {
|
|
52
|
-
height: 165px;
|
|
53
|
-
}
|
|
54
|
-
@include carbon--breakpoint('xlg') {
|
|
55
|
-
height: 215px;
|
|
56
|
-
}
|
|
39
|
+
aspect-ratio: 16 / 9;
|
|
57
40
|
}
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
@include carbon--breakpoint('max') {
|
|
22
|
-
|
|
23
|
-
padding-
|
|
22
|
+
max-width: rem(1544px);
|
|
23
|
+
padding-left: 424px;
|
|
24
|
+
padding-right: 0;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
|
|
@@ -28,11 +29,6 @@
|
|
|
28
29
|
padding: 0;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
// Grids on the homepage should be full width
|
|
32
|
-
.container:not(.container--homepage) .#{$prefix}--grid {
|
|
33
|
-
max-width: rem(1584px);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
32
|
//---------------------------------------
|
|
37
33
|
// Header styles
|
|
38
34
|
//---------------------------------------
|