@justeattakeaway/pie-css 0.16.0 → 0.17.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/README.md +24 -2
- package/dist/index.css +27 -0
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -20,12 +20,17 @@
|
|
|
20
20
|
3. Sass /SCSS
|
|
21
21
|
4. Native HTML
|
|
22
22
|
4. [What's included in the `pie-css` base stylesheet](#whats-included-in-the-pie-css-base-stylesheet)
|
|
23
|
-
|
|
23
|
+
1. [PIE Design Tokens](#pie-design-tokens)
|
|
24
|
+
2. [box-sizing](#box-sizing)
|
|
25
|
+
3. [Typography](#typography)
|
|
26
|
+
4. [z-index stacking context](#z-index-stacking-context)
|
|
27
|
+
5. [Reusable Animations](#reusable-animations)
|
|
28
|
+
5. [Using the `pie-css` SCSS helpers (mixins & functions)](#using-the-pie-css-scss-helpers-mixins--functions)
|
|
24
29
|
1. [Importing the `pie-css` SCSS helpers](#importing-the-pie-css-scss-helpers)
|
|
25
30
|
2. [`pie-css` SCSS Helper Definitions](#pie-css-scss-helper-definitions)
|
|
26
31
|
- [`font-size()`](#font-size)
|
|
27
32
|
- [`@include media()`](#include-media)
|
|
28
|
-
|
|
33
|
+
6. [Testing](#testing)
|
|
29
34
|
- [CSS](#css)
|
|
30
35
|
- [SCSS](#scss)
|
|
31
36
|
|
|
@@ -171,6 +176,7 @@ In most cases, a webpage should follow the DOM's natural stacking order and the
|
|
|
171
176
|
|
|
172
177
|
| Token | Z-Index Value |
|
|
173
178
|
| -------------------------- | ---------------|
|
|
179
|
+
| --dt-z-index-base: 1; | 1 |
|
|
174
180
|
| --dt-z-index-dropdown | 1000 |
|
|
175
181
|
| --dt-z-index-fab | 1000 |
|
|
176
182
|
| --dt-z-index-tooltip | 2000 |
|
|
@@ -181,6 +187,22 @@ In most cases, a webpage should follow the DOM's natural stacking order and the
|
|
|
181
187
|
| --dt-z-index-cookie-banner | 5000 |
|
|
182
188
|
| --dt-z-index-toast | 6000 |
|
|
183
189
|
|
|
190
|
+
### Reusable Animations
|
|
191
|
+
|
|
192
|
+
`pie-css` also ships with a set of reusable animations that can be applied to elements by adding a CSS class.
|
|
193
|
+
|
|
194
|
+
#### Slide Animation
|
|
195
|
+
|
|
196
|
+
| Class | Description |
|
|
197
|
+
| -------------------------- | ---------------|
|
|
198
|
+
| `.pie-animation--slide-in` | Slides an element in from the left. |
|
|
199
|
+
| `.pie-animation--slide-out`| Slides an element out to the left. |
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
**Customisation:**
|
|
203
|
+
|
|
204
|
+
The starting position of the slide animation can be customised by overriding the `--pie-animation-slide-translate-start` CSS variable. The default value is `-100%`.
|
|
205
|
+
|
|
184
206
|
---
|
|
185
207
|
|
|
186
208
|
## Using the `pie-css` SCSS helpers (mixins & functions)
|
package/dist/index.css
CHANGED
|
@@ -2048,6 +2048,33 @@ html[data-highcontrast-enabled] {
|
|
|
2048
2048
|
--dt-color-skeleton-shimmer-03-l: var(--dt-color-mozzarella-80-l);
|
|
2049
2049
|
}
|
|
2050
2050
|
}
|
|
2051
|
+
:root {
|
|
2052
|
+
--pie-animation-slide-translate-start: -100%;
|
|
2053
|
+
}
|
|
2054
|
+
.pie-animation--slide-in {
|
|
2055
|
+
animation: pie-animation-slide-in var(--dt-motion-timing-200) var(--dt-motion-easing-out);
|
|
2056
|
+
}
|
|
2057
|
+
.pie-animation--slide-out {
|
|
2058
|
+
animation: pie-animation-slide-out var(--dt-motion-timing-100) var(--dt-motion-easing-in);
|
|
2059
|
+
}
|
|
2060
|
+
@keyframes pie-animation-slide-in {
|
|
2061
|
+
from {
|
|
2062
|
+
transform: translate(var(--pie-animation-slide-translate-start));
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
to {
|
|
2066
|
+
transform: translate(0);
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
@keyframes pie-animation-slide-out {
|
|
2070
|
+
from {
|
|
2071
|
+
transform: translate(0);
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
to {
|
|
2075
|
+
transform: translate(var(--pie-animation-slide-translate-start));
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2051
2078
|
html {
|
|
2052
2079
|
box-sizing: border-box;
|
|
2053
2080
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-css",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "A styling library that provides both a shared collection of ready to use CSS styles to be used across JET web front-ends, and SCSS-based style helpers for our PIE Web Component library.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,5 +41,8 @@
|
|
|
41
41
|
"postcss": "8.4.32",
|
|
42
42
|
"postcss-import": "15.1.0",
|
|
43
43
|
"w3c-css-validator": "1.3.2"
|
|
44
|
+
},
|
|
45
|
+
"volta": {
|
|
46
|
+
"extends": "../../../package.json"
|
|
44
47
|
}
|
|
45
48
|
}
|