@penskemediacorp/larva-css 1.7.0-alpha.0 → 1.7.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/LICENSE +21 -0
- package/README.md +206 -19
- package/__tests__/fixtures/expected.js +29 -0
- package/__tests__/lib/generators.test.js +11 -0
- package/build/css/algorithms.common.async.css +4 -36
- package/build/css/algorithms.common.inline.css +21 -274
- package/build/css/generic.common.inline.css +4 -67
- package/build/css/js.common.async.css +3 -0
- package/build/css/js.common.inline.css +6 -9
- package/build/css/utilities.common.async.css +8 -55
- package/build/css/utilities.common.inline.css +27 -473
- package/gulpfile.js +110 -82
- package/lib/generators.js +93 -0
- package/package.json +14 -6
- package/src/01-generic/elements.common.inline.scss +33 -1
- package/src/01-generic/forms.common.inline.scss +10 -0
- package/src/01-generic/side-skins.common.inline.scss +10 -0
- package/src/01-generic/typography.common.inline.scss +23 -13
- package/src/02-algorithms/a-buy-now/a-buy-now.common.inline.scss +112 -0
- package/src/02-algorithms/a-carousel-grid/a-carousel-grid.common.inline.scss +66 -0
- package/src/02-algorithms/a-children-border/a-children-border.common.inline.scss +43 -0
- package/src/02-algorithms/a-children-link-color/a-children-link-color.common.inline.scss +15 -0
- package/src/02-algorithms/a-children-link-decoration/a-children-link-decoration.common.inline.scss +13 -0
- package/src/02-algorithms/a-counter/a-counter.common.inline.scss +26 -0
- package/src/02-algorithms/a-crop/README.md +17 -13
- package/src/02-algorithms/a-crop/a-crop.common.inline.scss +96 -12
- package/src/02-algorithms/a-crop/a-crop.html +2 -2
- package/src/02-algorithms/a-floated/a-floated.common.inline.scss +32 -0
- package/src/02-algorithms/a-font/a-font.common.inline.scss +3 -0
- package/src/02-algorithms/a-glue/a-glue.common.inline.scss +63 -6
- package/src/02-algorithms/a-glue/a-glue.html +3 -3
- package/src/02-algorithms/a-grid/README.md +141 -14
- package/src/02-algorithms/a-grid/a-grid.common.inline.scss +53 -5
- package/src/02-algorithms/a-grid/a-grid.html +4 -4
- package/src/02-algorithms/a-hidden/a-hidden.common.inline.scss +43 -0
- package/src/02-algorithms/a-hover-dropup/a-hover-dropup.common.async.scss +7 -7
- package/src/02-algorithms/a-hover-dropup/a-hover-dropup.html +3 -3
- package/src/02-algorithms/a-hover-effect/a-hover-effect.common.async.scss +25 -0
- package/src/02-algorithms/a-hover-effect/a-hover-effect.html +16 -0
- package/src/02-algorithms/a-icon/a-icon.common.async.scss +28 -3
- package/src/02-algorithms/a-icon/a-icon.common.inline.scss +51 -73
- package/src/02-algorithms/a-screen-reader-only/a-screen-reader-only.common.inline.scss +30 -0
- package/src/02-algorithms/a-scrollable-grid/a-scrollable-grid.common.inline.scss +52 -0
- package/src/02-algorithms/a-show-on-hover/a-show-on-hover.common.inline.scss +16 -0
- package/src/02-algorithms/a-space-children/a-space-children.common.inline.scss +88 -17
- package/src/02-algorithms/a-truncate-ellipsis/a-truncate-ellipsis.common.async.scss +71 -0
- package/src/02-algorithms/a-unstyle-button/a-unstyle-button.common.inline.scss +2 -3
- package/src/02-algorithms/a-unstyle-link/a-unstyle-link.common.inline.scss +7 -0
- package/src/02-algorithms/a-unstyle-list/a-unstyle-list.common.inline.scss +1 -1
- package/src/02-algorithms/a-wrapper/a-wrapper.common.inline.scss +14 -2
- package/src/03-utilities/u-background-color.common.async.scss +15 -0
- package/src/03-utilities/u-background-color.common.inline.scss +37 -0
- package/src/03-utilities/u-border-color.common.async.scss +36 -8
- package/src/03-utilities/u-border-radius.common.async.scss +26 -2
- package/src/03-utilities/u-border.common.inline.scss +215 -4
- package/src/03-utilities/u-box-alignment.common.inline.scss +64 -4
- package/src/03-utilities/u-box-shadow.common.async.scss +34 -3
- package/src/03-utilities/u-color.common.async.scss +19 -21
- package/src/03-utilities/u-color.common.inline.scss +39 -0
- package/src/03-utilities/u-cursor.common.async.scss +1 -1
- package/src/03-utilities/u-display.common.inline.scss +87 -4
- package/src/03-utilities/u-filter.common.async.scss +5 -0
- package/src/03-utilities/u-flex.common.inline.scss +151 -9
- package/src/03-utilities/u-font-family.common.inline.scss +41 -17
- package/src/03-utilities/u-font-size.common.inline.scss +58 -5
- package/src/03-utilities/u-font-style.common.inline.scss +9 -0
- package/src/03-utilities/u-font-weight.common.inline.scss +50 -12
- package/src/03-utilities/u-height.common.inline.scss +38 -8
- package/src/03-utilities/u-letter-spacing.common.inline.scss +11 -0
- package/src/03-utilities/u-line-height.common.inline.scss +49 -13
- package/src/03-utilities/u-list-style.common.async.scss +3 -0
- package/src/03-utilities/u-margin.common.inline.scss +182 -47
- package/src/03-utilities/u-max-width.common.inline.scss +25 -0
- package/src/03-utilities/u-opacity.common.inline.scss +3 -0
- package/src/03-utilities/u-order.common.inline.scss +29 -2
- package/src/03-utilities/u-overflow.common.inline.scss +14 -2
- package/src/03-utilities/u-padding.common.inline.scss +157 -52
- package/src/03-utilities/u-position.common.inline.scss +3 -0
- package/src/03-utilities/u-text-align.common.inline.scss +27 -4
- package/src/03-utilities/u-text-decoration.common.inline.scss +11 -0
- package/src/03-utilities/u-text-transform.common.inline.scss +14 -2
- package/src/03-utilities/u-transform.common.inline.scss +5 -0
- package/src/03-utilities/u-vertical-align.common.inline.scss +7 -0
- package/src/03-utilities/u-whitespace.common.inline.scss +1 -1
- package/src/03-utilities/u-width.common.inline.scss +192 -12
- package/src/04-js/README.md +5 -0
- package/src/04-js/js-Collapsible.common.inline.scss +15 -0
- package/src/04-js/js-ExpandableSearch.common.async.scss +33 -0
- package/src/04-js/js-Flickity.common.async.scss +91 -0
- package/src/04-js/js-Header.common.inline.scss +73 -0
- package/src/04-js/js-MegaMenu.common.inline.scss +50 -0
- package/src/04-js/js-MobileHeightToggle.common.inline.scss +7 -5
- package/src/04-js/js-PopOver.common.async.scss +13 -0
- package/src/04-js/js-Tooltip.common.inline.scss +17 -0
- package/src/04-js/js-VideoShowcase.common.inline.scss +33 -0
- package/src/04-js/partials/expandable-search.scss +202 -0
- package/src/04-js/partials/flickity.scss +149 -0
- package/src/_generated/_a-font.scss +1027 -0
- package/src/larva-ui/prism.scss +127 -0
- package/src/setup.scss +7 -0
- package/stylelint.config.js +10 -11
- package/holding/a-truncate-children/README.md +0 -3
- package/holding/a-truncate-children/a-truncate-children.browser-test.js +0 -104
- package/holding/a-truncate-children/a-truncate-children.css +0 -4
- package/holding/a-truncate-children/a-truncate-children.html +0 -15
- package/holding/a-truncate-children/a-truncate-children.scss +0 -5
- package/src/01-generic/config.common.inline.scss +0 -24
- package/src/02-algorithms/a-glue/index.js +0 -1
- package/src/02-algorithms/a-icon/a-icon.html +0 -20
- package/src/02-algorithms/a-unstyle-link/a-unstyle-link.common.async.scss +0 -5
- package/src/03-utilities/u-background.common.async.scss +0 -25
package/gulpfile.js
CHANGED
|
@@ -1,95 +1,123 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Things that are different from AMH:
|
|
3
|
+
* - path resolved to src/ not src/scss
|
|
4
|
+
* - no need to concat
|
|
5
|
+
* - remove lrvCssDir
|
|
6
|
+
*
|
|
7
|
+
* Potential improvement: make the config object dynamic, determine the
|
|
8
|
+
* dest file according to the changed file.
|
|
9
|
+
*/
|
|
7
10
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const Fiber = require( 'fibers' );
|
|
12
|
+
const gulp = require( 'gulp' );
|
|
13
|
+
const path = require( 'path' );
|
|
14
|
+
const sass = require( 'gulp-sass' );
|
|
15
|
+
const concat = require( 'gulp-concat' );
|
|
16
|
+
const gulpStylelint = require( 'gulp-stylelint' );
|
|
17
|
+
const del = require( 'del' );
|
|
18
|
+
const { mkdirpSync, existsSync } = require( 'fs-extra' );
|
|
13
19
|
|
|
14
|
-
|
|
15
|
-
// Generic
|
|
16
|
-
src('./src/*generic/*.common.inline.scss')
|
|
17
|
-
.pipe(gulpStylelint({
|
|
18
|
-
failAfterError: false,
|
|
19
|
-
reporters: [{
|
|
20
|
-
formatter: 'string',
|
|
21
|
-
console: true,
|
|
22
|
-
}]
|
|
23
|
-
}))
|
|
24
|
-
.pipe(sass( sassOpts ).on( 'error', sass.logError) )
|
|
25
|
-
.pipe(concat('generic.common.inline.css'))
|
|
26
|
-
.pipe(dest('./build/css/'));
|
|
20
|
+
const { generateAFontScss } = require( './lib/generators' );
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
.pipe(sass( sassOpts ).on('error', sass.logError))
|
|
30
|
-
.pipe(concat('generic.common.async.css'))
|
|
31
|
-
.pipe(dest('./build/css/'));
|
|
22
|
+
sass.compiler = require( 'sass' );
|
|
32
23
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
reporters: [{
|
|
39
|
-
formatter: 'string',
|
|
40
|
-
console: true,
|
|
41
|
-
}]
|
|
42
|
-
}))
|
|
43
|
-
.pipe(sass( sassOpts ).on('error', sass.logError))
|
|
44
|
-
.pipe(concat('algorithms.common.inline.css'))
|
|
45
|
-
.pipe(dest('./build/css/'));
|
|
24
|
+
const sassOpts = {
|
|
25
|
+
includePaths: [ path.resolve( './node_modules' ), path.resolve( './src' ) ],
|
|
26
|
+
outputStyle: 'compressed',
|
|
27
|
+
fiber: Fiber,
|
|
28
|
+
};
|
|
46
29
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
failAfterError: false,
|
|
50
|
-
reporters: [{
|
|
51
|
-
formatter: 'string',
|
|
52
|
-
console: true,
|
|
53
|
-
}]
|
|
54
|
-
}))
|
|
55
|
-
.pipe(sass( sassOpts ).on('error', sass.logError))
|
|
56
|
-
.pipe(concat('algorithms.common.async.css'))
|
|
57
|
-
.pipe(dest('./build/css/'));
|
|
30
|
+
const cssDest = './build/css/';
|
|
31
|
+
const scssDest = './src/_generated';
|
|
58
32
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
33
|
+
const cssFiles = {
|
|
34
|
+
generic_inline: {
|
|
35
|
+
css: {
|
|
36
|
+
orig: [ './src/01-generic/*.common.inline.scss' ],
|
|
37
|
+
file: 'generic.common.inline.css',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
algorithms_async: {
|
|
41
|
+
css: {
|
|
42
|
+
orig: [ './src/**/a-*.common.async.scss' ],
|
|
43
|
+
file: 'algorithms.common.async.css',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
algorithms_inline: {
|
|
47
|
+
css: {
|
|
48
|
+
orig: [ './src/**/a-*.common.inline.scss' ],
|
|
49
|
+
file: 'algorithms.common.inline.css',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
utilities_async: {
|
|
53
|
+
css: {
|
|
54
|
+
orig: [ './src/**/u-*.common.async.scss' ],
|
|
55
|
+
file: 'utilities.common.async.css',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
utilities_inline: {
|
|
59
|
+
css: {
|
|
60
|
+
orig: [ './src/**/u-*.common.inline.scss' ],
|
|
61
|
+
file: 'utilities.common.inline.css',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
js_async: {
|
|
65
|
+
css: {
|
|
66
|
+
orig: [ './src/**/js-*.common.async.scss' ],
|
|
67
|
+
file: 'js.common.async.css',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
js_inline: {
|
|
71
|
+
css: {
|
|
72
|
+
orig: [ './src/**/js-*.common.inline.scss' ],
|
|
73
|
+
file: 'js.common.inline.css',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
64
77
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
78
|
+
const generateScssFromTokens = ( done ) => {
|
|
79
|
+
mkdirpSync( scssDest );
|
|
80
|
+
generateAFontScss( scssDest );
|
|
81
|
+
done();
|
|
82
|
+
};
|
|
69
83
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
.pipe(sass( sassOpts ).on('error', sass.logError))
|
|
73
|
-
.pipe(concat('js.common.inline.css'))
|
|
74
|
-
.pipe(dest('./build/css/'));
|
|
84
|
+
const clean = ( done ) => {
|
|
85
|
+
const dirs = [ scssDest, cssDest ];
|
|
75
86
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
87
|
+
dirs.forEach( ( dir ) => {
|
|
88
|
+
if ( existsSync( dir ) ) {
|
|
89
|
+
del.sync( [ dir ] );
|
|
90
|
+
}
|
|
91
|
+
} );
|
|
80
92
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
// dirname: 'js',
|
|
87
|
-
// }))
|
|
88
|
-
// .pipe(dest('./build/css/'));
|
|
93
|
+
done();
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const styles = ( done ) => {
|
|
97
|
+
mkdirpSync( cssDest );
|
|
89
98
|
|
|
99
|
+
Object.keys( cssFiles ).forEach( ( val ) => {
|
|
100
|
+
gulp.src( cssFiles[ val ].css.orig )
|
|
101
|
+
.pipe(
|
|
102
|
+
gulpStylelint( {
|
|
103
|
+
failAfterError: false,
|
|
104
|
+
reporters: [
|
|
105
|
+
{
|
|
106
|
+
formatter: 'string',
|
|
107
|
+
console: true,
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
} )
|
|
111
|
+
)
|
|
112
|
+
.pipe( sass( sassOpts ).on( 'error', sass.logError ) )
|
|
113
|
+
.pipe( concat( cssFiles[ val ].css.file ) )
|
|
114
|
+
.pipe( gulp.dest( cssDest ) );
|
|
115
|
+
} );
|
|
90
116
|
done();
|
|
91
|
-
}
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
exports.watch = function () {
|
|
120
|
+
gulp.watch( './src/**/*.scss', styles );
|
|
121
|
+
};
|
|
92
122
|
|
|
93
|
-
exports.default =
|
|
94
|
-
watch( './src/**/*.scss', series( styles ) );
|
|
95
|
-
}
|
|
123
|
+
exports.default = gulp.series( clean, generateScssFromTokens, styles );
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies.
|
|
3
|
+
*/
|
|
4
|
+
const fs = require( 'fs-extra' );
|
|
5
|
+
const path = require( 'path' );
|
|
6
|
+
const { kebabify } = require( '../../larva-tokens/lib/utils' );
|
|
7
|
+
const fontData = require( '../../larva-tokens/lib/font-data' );
|
|
8
|
+
|
|
9
|
+
const { allSelectors, tokenProperties } = fontData;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Transform properties into CSS-friendly format.
|
|
13
|
+
*
|
|
14
|
+
* @return Array of properties in kebab-case.
|
|
15
|
+
*/
|
|
16
|
+
const properties = tokenProperties.map( ( property ) => kebabify( property ) );
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Form a ruleset for the selector that builds custom properties
|
|
20
|
+
* that correspond to tokens for the style.
|
|
21
|
+
*
|
|
22
|
+
* @param {string} selector
|
|
23
|
+
* @return {string} CSS ruleset for the selector.
|
|
24
|
+
*/
|
|
25
|
+
const ruleset = ( selector ) => {
|
|
26
|
+
let css = '';
|
|
27
|
+
|
|
28
|
+
const nameSlugs = selector.split( '-' );
|
|
29
|
+
const family = nameSlugs[ 3 ];
|
|
30
|
+
const tokenBase = [ ...nameSlugs ].slice( 3, nameSlugs.length ).join( '-' );
|
|
31
|
+
|
|
32
|
+
css += `\n\t// Define this token locally; it can be defined via larva-tokens, if needed in the future.
|
|
33
|
+
--font-family: var( --font-family-${ family } );
|
|
34
|
+
|
|
35
|
+
font-family: var( --font-family );`;
|
|
36
|
+
|
|
37
|
+
css += '\n';
|
|
38
|
+
|
|
39
|
+
properties.forEach( ( property ) => {
|
|
40
|
+
css += `\t${ property }: var( --${ tokenBase }-${ property }-mobile );\n`;
|
|
41
|
+
} );
|
|
42
|
+
|
|
43
|
+
css += '\n';
|
|
44
|
+
css += '\t@media (min-width: $screen-desktop) {';
|
|
45
|
+
css += '\n';
|
|
46
|
+
|
|
47
|
+
properties.forEach( ( property ) => {
|
|
48
|
+
css += `\t\t${ property }: var( --${ tokenBase }-${ property }-desktop );\n`;
|
|
49
|
+
} );
|
|
50
|
+
css += '\t}\n';
|
|
51
|
+
css += '\t@media (min-width: $screen-desktop-xl) {';
|
|
52
|
+
css += '\n';
|
|
53
|
+
|
|
54
|
+
properties.forEach( ( property ) => {
|
|
55
|
+
css += `\t\t${ property }: var( --${ tokenBase }-${ property }-desktop-xl );\n`;
|
|
56
|
+
} );
|
|
57
|
+
css += '\t}';
|
|
58
|
+
|
|
59
|
+
return css;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Build the CSS string with rulesets for each selector.
|
|
64
|
+
*
|
|
65
|
+
* @param {Array} selectors
|
|
66
|
+
* @return {string} CSS to be written to a file.
|
|
67
|
+
*/
|
|
68
|
+
const generate = ( selectors ) => {
|
|
69
|
+
let css = '';
|
|
70
|
+
|
|
71
|
+
selectors.forEach( ( selector ) => {
|
|
72
|
+
css += `\n.${ selector } {`;
|
|
73
|
+
css += ruleset( selector );
|
|
74
|
+
css += `\n}\n`;
|
|
75
|
+
} );
|
|
76
|
+
|
|
77
|
+
return css;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const generateAFontScss = ( directory ) => {
|
|
81
|
+
let css = '// Generated css from larva-tokens/lib/generators.js\n';
|
|
82
|
+
|
|
83
|
+
css += generate( allSelectors );
|
|
84
|
+
|
|
85
|
+
fs.writeFileSync( path.join( directory, `_a-font.scss` ), css );
|
|
86
|
+
console.log( 'Generated _a-font.scss.' ); // eslint-disable-line no-console
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
module.exports = {
|
|
90
|
+
generate,
|
|
91
|
+
ruleset,
|
|
92
|
+
generateAFontScss,
|
|
93
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@penskemediacorp/larva-css",
|
|
3
|
-
"version": "1.7.0
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Larva CSS.",
|
|
5
5
|
"author": "laras126 <laras126@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/penske-media-corp/pmc-larva#readme",
|
|
@@ -15,15 +15,23 @@
|
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"test": "../../node_modules/.bin/jest",
|
|
18
|
-
"
|
|
18
|
+
"build": "./node_modules/.bin/gulp",
|
|
19
|
+
"dev": "./node_modules/.bin/gulp watch"
|
|
19
20
|
},
|
|
20
21
|
"bugs": {
|
|
21
22
|
"url": "https://github.com/penske-media-corp/pmc-larva/issues"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
|
-
"@penskemediacorp/larva-scss": "^1.
|
|
25
|
-
"
|
|
26
|
-
"
|
|
25
|
+
"@penskemediacorp/larva-scss": "^1.1.2",
|
|
26
|
+
"@penskemediacorp/larva-tokens": "^1.0.0",
|
|
27
|
+
"del": "^6.0.0",
|
|
28
|
+
"fibers": "^5.0.1",
|
|
29
|
+
"fs-extra": "^9.1.0",
|
|
30
|
+
"gulp": "^4.0.2",
|
|
31
|
+
"gulp-concat": "^2.6.1",
|
|
32
|
+
"gulp-sass": "^4.1.0",
|
|
33
|
+
"gulp-stylelint": "^13.0.0",
|
|
34
|
+
"sass": "^1.32.8"
|
|
27
35
|
},
|
|
28
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "cf6bd59be49f53f8591ef4d8c845b3b9a06b3e12"
|
|
29
37
|
}
|
|
@@ -1,6 +1,34 @@
|
|
|
1
|
+
@import 'setup';
|
|
1
2
|
|
|
2
|
-
|
|
3
|
+
html {
|
|
4
|
+
// Use whitespace and initial in custom properties to invalidate values
|
|
5
|
+
// for simplification of media queries.
|
|
6
|
+
// Explanation::
|
|
7
|
+
// https://lea.verou.me/2020/10/the-var-space-hack-to-toggle-multiple-values-with-one-custom-property/
|
|
8
|
+
// Reduced example:
|
|
9
|
+
// https://codepen.io/laras126/pen/ExZbvPY
|
|
10
|
+
|
|
11
|
+
--ON: initial;
|
|
12
|
+
--OFF: /*! whitespace toggle */;
|
|
13
|
+
|
|
14
|
+
--is-desktop: var( --OFF );
|
|
15
|
+
--is-desktopxl: var( --OFF );
|
|
16
|
+
|
|
17
|
+
@include pmc-breakpoint( desktop ) {
|
|
18
|
+
--is-desktop: var( --ON );
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@include pmc-breakpoint( desktop-xl ) {
|
|
22
|
+
--is-desktopxl: var( --ON );
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
*,
|
|
27
|
+
::before,
|
|
28
|
+
::after {
|
|
3
29
|
box-sizing: border-box;
|
|
30
|
+
border-width: 0;
|
|
31
|
+
border-style: solid;
|
|
4
32
|
}
|
|
5
33
|
|
|
6
34
|
img {
|
|
@@ -24,4 +52,8 @@ figure {
|
|
|
24
52
|
|
|
25
53
|
svg {
|
|
26
54
|
fill: currentColor;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
cite {
|
|
58
|
+
font-style: normal;
|
|
27
59
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@import 'setup';
|
|
2
|
+
|
|
3
|
+
// For side skin ads. This is added to `body` or to `html`.
|
|
4
|
+
// If the elements inside have been build responsively, everything
|
|
5
|
+
// should automatically adjust for the skins.
|
|
6
|
+
.has-side-skins {
|
|
7
|
+
max-width: $screen-desktop;
|
|
8
|
+
margin-left: auto;
|
|
9
|
+
margin-right: auto;
|
|
10
|
+
}
|
|
@@ -1,30 +1,40 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import 'setup';
|
|
2
2
|
|
|
3
3
|
body {
|
|
4
4
|
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
font-family: Helvetica, sans-serif;
|
|
5
|
+
// stylelint-disable property-disallowed-list
|
|
6
|
+
font-family: map-get( $TOKENS-MAP, font-family-basic );
|
|
7
|
+
font-family: var( --font-family-basic, #{map-get( $TOKENS-MAP, font-family-basic )} );
|
|
9
8
|
|
|
10
9
|
margin: $spacer-0;
|
|
11
|
-
|
|
12
|
-
// stylelint-enable property-blacklist
|
|
10
|
+
// stylelint-enable property-disallowed-list
|
|
13
11
|
|
|
14
12
|
line-height: $line-height-normal;
|
|
15
13
|
}
|
|
16
14
|
|
|
15
|
+
// Apply the webfont when fonts are loaded.
|
|
16
|
+
.wf-active body {
|
|
17
|
+
|
|
18
|
+
@each $token, $value in $TOKENS-MAP {
|
|
19
|
+
$token-str: quote( $token );
|
|
20
|
+
|
|
21
|
+
// example: font-family-primary
|
|
22
|
+
// each will have a corresponding `fancy` variation.
|
|
23
|
+
@if str-index( $token-str, 'font-family' ) and not str-index( $token-str, 'fancy' ) {
|
|
24
|
+
--#{$token}: var( --#{$token}-fancy );
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
strong {
|
|
18
|
-
font-weight: $font-
|
|
31
|
+
font-weight: map-get( $semantic-font-weights, bold );
|
|
19
32
|
}
|
|
20
33
|
|
|
21
34
|
a {
|
|
22
|
-
color: map-get( $
|
|
35
|
+
color: map-get( $TOKENS-MAP, brand-primary );
|
|
36
|
+
color: var( --color-brand-primary, #{map-get( $TOKENS-MAP, color-brand-primary )} );
|
|
23
37
|
text-decoration: none;
|
|
24
|
-
|
|
25
|
-
&:hover {
|
|
26
|
-
color: map-get( $semantic-color-list, brand-red-dark );
|
|
27
|
-
}
|
|
28
38
|
}
|
|
29
39
|
|
|
30
40
|
h1,
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
@import 'setup';
|
|
2
|
+
|
|
3
|
+
.lrv-a-buy-now {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: center;
|
|
7
|
+
position: relative;
|
|
8
|
+
|
|
9
|
+
@include pmc-breakpoint( tablet ) {
|
|
10
|
+
display: block;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.lrv-a-buy-now__image {
|
|
15
|
+
position: relative;
|
|
16
|
+
z-index: 1;
|
|
17
|
+
width: 100%;
|
|
18
|
+
background-color: $color-white;
|
|
19
|
+
max-width: pmc-rem(300);
|
|
20
|
+
|
|
21
|
+
@include pmc-breakpoint( tablet ) {
|
|
22
|
+
width: pmc-rem(190); // 160 + 30
|
|
23
|
+
left: 0;
|
|
24
|
+
padding: 0 pmc-rem(30) 0 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@include pmc-breakpoint( desktop ) {
|
|
28
|
+
width: pmc-rem(245); // 185 + 30 + 30
|
|
29
|
+
left: pmc-rem(94);
|
|
30
|
+
padding: 0 pmc-rem(30);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.lrv-a-buy-now__button {
|
|
35
|
+
margin-top: pmc-rem(16);
|
|
36
|
+
|
|
37
|
+
@include pmc-breakpoint( tablet ) {
|
|
38
|
+
margin-top: 0;
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: 50%;
|
|
41
|
+
left: pmc-rem(190);
|
|
42
|
+
transform: translateY(-50%);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@include pmc-breakpoint( desktop ) {
|
|
46
|
+
left: pmc-rem(339);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.lrv-a-buy-now__hr {
|
|
51
|
+
display: none;
|
|
52
|
+
margin: 0;
|
|
53
|
+
padding: 0;
|
|
54
|
+
border-top: pmc-rem(0.5) solid #000;
|
|
55
|
+
position: relative;
|
|
56
|
+
|
|
57
|
+
@include pmc-breakpoint( tablet ) {
|
|
58
|
+
display: block;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.lrv-a-buy-now__hr--top {
|
|
63
|
+
top: 0;
|
|
64
|
+
|
|
65
|
+
@include pmc-breakpoint( tablet ) {
|
|
66
|
+
top: pmc-rem(37);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@include pmc-breakpoint( desktop ) {
|
|
70
|
+
top: pmc-rem(50);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.lrv-a-buy-now__hr--bottom {
|
|
75
|
+
bottom: 0;
|
|
76
|
+
|
|
77
|
+
@include pmc-breakpoint( tablet ) {
|
|
78
|
+
bottom: pmc-rem(37);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@include pmc-breakpoint( desktop ) {
|
|
82
|
+
bottom: pmc-rem(50);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Optional span.
|
|
87
|
+
.lrv-a-buy-now__span {
|
|
88
|
+
display: none;
|
|
89
|
+
position: absolute;
|
|
90
|
+
right: 0;
|
|
91
|
+
|
|
92
|
+
@include pmc-breakpoint( tablet ) {
|
|
93
|
+
display: block;
|
|
94
|
+
bottom: pmc-rem(16);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@include pmc-breakpoint( desktop ) {
|
|
98
|
+
bottom: pmc-rem(29);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Used when image is not present.
|
|
103
|
+
.lrv-a-buy-now__p {
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
align-items: center;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.lrv-a-buy-now__p .lrv-a-buy-now__button {
|
|
110
|
+
position: inherit;
|
|
111
|
+
transform: none;
|
|
112
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@import 'setup';
|
|
2
|
+
|
|
3
|
+
.lrv-a-carousel-grid {
|
|
4
|
+
--grid-overlay: initial;
|
|
5
|
+
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-columns: 1fr;
|
|
8
|
+
|
|
9
|
+
@include pmc-breakpoint( tablet ) {
|
|
10
|
+
grid-gap: var(--spacing-050);
|
|
11
|
+
grid-template-columns: 2fr 1fr;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.lrv-a-carousel-grid__overlay {
|
|
16
|
+
--grid-overlay: grid;
|
|
17
|
+
|
|
18
|
+
@include pmc-breakpoint( tablet ) {
|
|
19
|
+
grid-template-columns: 1fr;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.lrv-a-carousel-grid__overlay--primary {
|
|
24
|
+
|
|
25
|
+
@include pmc-breakpoint( desktop ) {
|
|
26
|
+
display: var(--grid-overlay);
|
|
27
|
+
grid-template-columns: 1fr 1.5rem 2fr;
|
|
28
|
+
align-items: center;
|
|
29
|
+
grid-auto-flow: column;
|
|
30
|
+
height: 100%;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.lrv-a-carousel-grid__overlay--primary-img {
|
|
35
|
+
|
|
36
|
+
@include pmc-breakpoint( desktop ) {
|
|
37
|
+
grid-column: 2/4;
|
|
38
|
+
grid-row: 1;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.lrv-a-carousel-grid__overlay--primary-content {
|
|
43
|
+
|
|
44
|
+
@include pmc-breakpoint( desktop ) {
|
|
45
|
+
grid-column: 1/3;
|
|
46
|
+
grid-row: 1;
|
|
47
|
+
padding: 1.875rem;
|
|
48
|
+
z-index: 1;
|
|
49
|
+
background-color: #fff;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.lrv-a-carousel-grid__overlay--secondary {
|
|
54
|
+
|
|
55
|
+
@include pmc-breakpoint( desktop ) {
|
|
56
|
+
display: var(--grid-overlay);
|
|
57
|
+
grid-template-columns: repeat(3,1fr);
|
|
58
|
+
grid-gap: var(--spacing-125);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.lrv-a-carousel-grid__overlay--secondary-card {
|
|
63
|
+
display: var(--grid-overlay);
|
|
64
|
+
grid-template-columns: 6.25rem 1fr;
|
|
65
|
+
grid-gap: var(--spacing-1);
|
|
66
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@import 'setup';
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--a-children-border-color: #{ map-get( $TOKENS-MAP, color-black ) };
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.lrv-a-children-border--grey {
|
|
8
|
+
--a-children-border-color: #{ map-get( $TOKENS-MAP, border-color-grey ) };
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.lrv-a-children-border--grey-light {
|
|
12
|
+
--a-children-border-color: #{ map-get( $TOKENS-MAP, border-color-grey-light ) };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// stylelint-disable selector-max-compound-selectors
|
|
16
|
+
.lrv-a-children-border-vertical {
|
|
17
|
+
& > * + * {
|
|
18
|
+
border-top: var(--a-children-border-width, 1px) solid var(--a-children-border-color, '');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.lrv-a-children-border-vertical\@mobile-max {
|
|
23
|
+
@include pmc-breakpoint(mobile-max) {
|
|
24
|
+
& > * + * {
|
|
25
|
+
border-top: var(--a-children-border-width, 1px) solid var(--a-children-border-color, '');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.lrv-a-children-border-horizontal {
|
|
31
|
+
& > * + * {
|
|
32
|
+
border-left: var(--a-children-border-width, 1px) solid var(--a-children-border-color, '');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.lrv-a-children-border-horizontal\@desktop {
|
|
37
|
+
@include pmc-breakpoint(desktop) {
|
|
38
|
+
& > * + * {
|
|
39
|
+
border-left: var(--a-children-border-width, 1px) solid var(--a-children-border-color, '');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// stylelint-enable selector-max-compound-selectors
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@import 'setup';
|
|
2
|
+
|
|
3
|
+
.lrv-a-children-link-color-black {
|
|
4
|
+
& > a {
|
|
5
|
+
color: map-get( $TOKENS-MAP, color-black );
|
|
6
|
+
color: var( --color-black );
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.lrv-a-children-link-color-brand-primary\:hover {
|
|
11
|
+
& > a:hover {
|
|
12
|
+
color: map-get( $TOKENS-MAP, color-brand-primary );
|
|
13
|
+
color: var( --color-brand-primary );
|
|
14
|
+
}
|
|
15
|
+
}
|