@penskemediacorp/larva-css 0.7.2 → 0.7.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/build/css/algorithms.common.async.css +1 -1
- package/build/css/algorithms.common.inline.css +12 -12
- package/build/css/js.common.async.css +1 -0
- package/build/css/js.common.inline.css +3 -0
- package/build/css/utilities.common.inline.css +10 -8
- package/package.json +4 -4
- package/src/02-algorithms/a-children-border/a-children-border.common.inline.scss +8 -0
- package/src/02-algorithms/a-crop/a-crop.common.inline.scss +15 -0
- package/src/02-algorithms/a-glue/a-glue.common.inline.scss +28 -0
- package/src/02-algorithms/a-hidden/a-hidden.common.inline.scss +6 -0
- package/src/02-algorithms/a-icon/a-icon.common.async.scss +1 -1
- package/src/02-algorithms/a-icon/a-icon.common.inline.scss +17 -0
- package/src/03-utilities/u-border.common.inline.scss +46 -0
- package/src/03-utilities/u-box-alignment.common.inline.scss +4 -0
- package/src/03-utilities/u-display.common.inline.scss +20 -0
- package/src/03-utilities/u-font-size.common.inline.scss +1 -0
- package/src/03-utilities/u-height.common.inline.scss +37 -11
- package/src/03-utilities/u-letter-spacing.common.inline.scss +1 -1
- package/src/03-utilities/u-max-width.common.inline.scss +8 -0
- package/src/03-utilities/u-padding.common.inline.scss +4 -0
- 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-width.common.inline.scss +44 -0
- package/src/04-js/js-ExpandableSearch.common.async.scss +33 -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-Tooltip.common.inline.scss +17 -0
- package/src/04-js/partials/expandable-search.scss +202 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
@import 'setup';
|
|
2
|
+
|
|
3
|
+
// Note:
|
|
4
|
+
// Swiftype markup is generated dynamically, so plain CSS is used instead of
|
|
5
|
+
// Larva CSS classes.
|
|
6
|
+
|
|
7
|
+
// The Swiftype module appears in 3 modules, or contexts:
|
|
8
|
+
// 1. header (desktop, not sticky)
|
|
9
|
+
// 2. header-sticky (desktop, sticky)
|
|
10
|
+
// 3. mega-menu (all sizes)
|
|
11
|
+
|
|
12
|
+
// The CSS is structured like so:
|
|
13
|
+
// Base styles that apply to everything added to .swiftype.
|
|
14
|
+
// Style specific for each context, applied by adding specificity with .context-module .swiftype.
|
|
15
|
+
// BEM modifier classes are intentionally not used because the specificity is helpful here,
|
|
16
|
+
// and we can use the exiting module classes instead of creating new names for modifiers.
|
|
17
|
+
|
|
18
|
+
//
|
|
19
|
+
// Base module styles
|
|
20
|
+
//
|
|
21
|
+
.expandable-search {
|
|
22
|
+
color: var( --color-black );
|
|
23
|
+
|
|
24
|
+
$border-size: pmc-rem(2);
|
|
25
|
+
$input-width: pmc-rem(44);
|
|
26
|
+
|
|
27
|
+
.search-form {
|
|
28
|
+
display: flex;
|
|
29
|
+
position: relative;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Search icon over input
|
|
33
|
+
.search-form::after {
|
|
34
|
+
content: '';
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 50%;
|
|
37
|
+
right: $spacer-1;
|
|
38
|
+
|
|
39
|
+
// Basically a-icon
|
|
40
|
+
content: '';
|
|
41
|
+
// search.svg from larva-svg.
|
|
42
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Ctitle%3ESearch Icon%3C/title%3E%3Cpath d='M17.7 16.3l-1.5 1.5-5-5V12l-.2-.2c-1.1 1-2.6 1.6-4.2 1.6-3.6 0-6.5-2.9-6.5-6.5S3.2.4 6.8.4s6.5 2.9 6.5 6.5c0 1.6-.6 3.1-1.6 4.2l.3.3h.8l4.9 4.9zm-6.5-9.5c0-2.5-2-4.5-4.5-4.5s-4.5 2-4.5 4.5 2 4.5 4.5 4.5 4.5-2 4.5-4.5z' fill-rule='evenodd'/%3E%3C/svg%3E");
|
|
43
|
+
height: pmc-rem(24);
|
|
44
|
+
width: pmc-rem(24);
|
|
45
|
+
background-repeat: no-repeat;
|
|
46
|
+
background-size: contain;
|
|
47
|
+
transform: translateY( -50% );
|
|
48
|
+
pointer-events: none;
|
|
49
|
+
z-index: 2;
|
|
50
|
+
transition: $transition-transform transform;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.search-form > label:first-of-type {
|
|
54
|
+
position: relative;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.search-form > label:first-of-type::after {
|
|
58
|
+
content: '';
|
|
59
|
+
position: absolute;
|
|
60
|
+
bottom: pmc-rem(17);
|
|
61
|
+
left: pmc-rem(20);
|
|
62
|
+
height: pmc-rem(1);
|
|
63
|
+
background-color: map-get( $TOKENS-MAP, background-color-black );
|
|
64
|
+
width: calc(100% - 5rem);
|
|
65
|
+
display: inline-block;
|
|
66
|
+
z-index: 9;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// White swatch to cover submit text
|
|
70
|
+
.search-form::before {
|
|
71
|
+
background-color: map-get( $TOKENS-MAP, background-color-white );
|
|
72
|
+
content: '';
|
|
73
|
+
position: absolute;
|
|
74
|
+
right: $border-size;
|
|
75
|
+
top: $border-size;
|
|
76
|
+
height: calc( 100% - #{$border-size} * 2 );
|
|
77
|
+
width: $input-width;
|
|
78
|
+
z-index: 1;
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Style input text to be invisible, hidden beneath search icon.
|
|
83
|
+
.search-form input[type='text'],
|
|
84
|
+
.search-form input[type='search'] {
|
|
85
|
+
border: 2px solid var( --color-black );
|
|
86
|
+
padding: $spacer-050 $spacer-125 ;
|
|
87
|
+
min-width: pmc-rem(300);
|
|
88
|
+
font-family: var( --font-family-body );
|
|
89
|
+
box-shadow: $shadow-light;
|
|
90
|
+
font-size: pmc-rem(10);
|
|
91
|
+
height: pmc-rem(62);
|
|
92
|
+
position: relative;
|
|
93
|
+
&::-webkit-input-placeholder { /* Edge */
|
|
94
|
+
color: var( --color-black );
|
|
95
|
+
text-transform: uppercase;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:-ms-input-placeholder { /* Internet Explorer 10-11 */
|
|
99
|
+
color: var( --color-black );
|
|
100
|
+
text-transform: uppercase;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&::placeholder {
|
|
104
|
+
color: var( --color-black );
|
|
105
|
+
text-transform: uppercase;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.search-form input[type='submit'] {
|
|
110
|
+
position: absolute;
|
|
111
|
+
right: $border-size;
|
|
112
|
+
height: 100%;
|
|
113
|
+
width: $input-width;
|
|
114
|
+
overflow: hidden;
|
|
115
|
+
|
|
116
|
+
// lrv-a-unstyle-button
|
|
117
|
+
border: 0;
|
|
118
|
+
background-color: transparent;
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.swiftype-widget {
|
|
123
|
+
background-color: var( --background-color-body );
|
|
124
|
+
box-shadow: $shadow-medium;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.ac-section-title {
|
|
128
|
+
font-family: var( --font-family-basic );
|
|
129
|
+
padding-bottom: $spacer-025;
|
|
130
|
+
font-size: $font-size-14;
|
|
131
|
+
font-weight: var( --font-weight-bold );
|
|
132
|
+
text-transform: uppercase;
|
|
133
|
+
padding-left: $spacer-050;
|
|
134
|
+
padding-right: $spacer-050;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.autocomplete-section {
|
|
138
|
+
padding-top: $spacer-1;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.ac-result {
|
|
142
|
+
padding: $spacer-050;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ac-result:hover,
|
|
146
|
+
.ac-result:focus {
|
|
147
|
+
color: var( --color-brand-primary );
|
|
148
|
+
background-color: var( --background-color-grey-lightest );
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.ac-result em {
|
|
153
|
+
font-weight: var( --font-weight-bold );
|
|
154
|
+
font-style: normal;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.ac-result {
|
|
158
|
+
border-top: 1px solid var( --color-grey-light );
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.ac_title {
|
|
162
|
+
font-family: var( --font-family-primary );
|
|
163
|
+
line-height: var( --line-height-normal );
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.ac_title,
|
|
167
|
+
.ac_tag {
|
|
168
|
+
font-family: var( --font-family-body );
|
|
169
|
+
font-size: $font-size-16;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.ac_sub {
|
|
173
|
+
font-family: var( --font-family-body );
|
|
174
|
+
font-size: $font-size-14;
|
|
175
|
+
font-style: italic;
|
|
176
|
+
color: var( --color-grey-dark );
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.sticky-expandable {
|
|
180
|
+
.search-form {
|
|
181
|
+
&> label:first-of-type::after {
|
|
182
|
+
left: 3.2rem;
|
|
183
|
+
}
|
|
184
|
+
&::before {
|
|
185
|
+
left: 0.125rem;
|
|
186
|
+
right: unset;
|
|
187
|
+
}
|
|
188
|
+
&::after {
|
|
189
|
+
left: 1rem;
|
|
190
|
+
right: unset;
|
|
191
|
+
}
|
|
192
|
+
input[type=search] {
|
|
193
|
+
padding: .5rem 1.25rem .5rem 3.2rem;
|
|
194
|
+
}
|
|
195
|
+
input[type=submit] {
|
|
196
|
+
left: 0.125rem;
|
|
197
|
+
right: unset;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
}
|