@justeattakeaway/pie-css 0.5.1 → 0.6.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 CHANGED
@@ -19,7 +19,8 @@
19
19
  3. Sass /SCSS
20
20
  4. Native HTML
21
21
  3. [Using the PIE CSS – SCSS helpers](#helpers)
22
- 4. [Testing](#testing)
22
+ 4. [Z-index](#z-index)
23
+ 5. [Testing](#testing)
23
24
  - [CSS](#css)
24
25
  - [SCSS](#scss )
25
26
 
@@ -128,6 +129,22 @@ These are for carrying out common tasks in our styles, such as setting font size
128
129
 
129
130
  We will be writing more in-depth docs on these SCSS helpers shortly, but for now, feel free to browse the [SCSS code in the PIE mono-repo](https://github.com/justeattakeaway/pie/tree/main/packages/tools/pie-css/scss).
130
131
 
132
+ ## z-index
133
+
134
+ Some PIE Web Components use a z-index value to control how they stack on a webpage. These values are defined in the `pie-css` package as css variables and are utilized internally. In most cases, a webpage should follow the DOM's natural stacking order and the default z-index order assigned for each component. However, if you're creating custom components, refer to the following table to make sure they don't conflict with other components.
135
+
136
+ | Token | Z-Index Value |
137
+ | -------------------------- | ---------------|
138
+ | --dt-z-index-dropdown | 1000 |
139
+ | --dt-z-index-fab | 1000 |
140
+ | --dt-z-index-tooltip | 2000 |
141
+ | --dt-z-index-popover | 3000 |
142
+ | --dt-z-index-bottom-sheet | 4000 |
143
+ | --dt-z-index-side-sheet | 4000 |
144
+ | --dt-z-index-modal | 4000 |
145
+ | --dt-z-index-cookie-banner | 5000 |
146
+ | --dt-z-index-toast | 6000 |
147
+
131
148
  ## Testing
132
149
 
133
150
  We strive to ensure all styles are appropriately tested. How we test the styles differs for CSS and SCSS. Below, we outline both approaches.
package/dist/index.css CHANGED
@@ -1105,3 +1105,16 @@ html {
1105
1105
  *:after {
1106
1106
  box-sizing: inherit;
1107
1107
  }
1108
+ /* The z-index priority order of different components.
1109
+ The values start at a high and specific number to avoid any conflicts */
1110
+ :root {
1111
+ --dt-z-index-dropdown: 1000;
1112
+ --dt-z-index-fab: 1000;
1113
+ --dt-z-index-tooltip: 2000;
1114
+ --dt-z-index-popover: 3000;
1115
+ --dt-z-index-bottom-sheet: 4000;
1116
+ --dt-z-index-side-sheet: 4000;
1117
+ --dt-z-index-modal: 4000;
1118
+ --dt-z-index-cookie-banner: 5000;
1119
+ --dt-z-index-toast: 6000;
1120
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-css",
3
- "version": "0.5.1",
3
+ "version": "0.6.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
  "author": "Just Eat Takeaway.com - Design System Team",
6
6
  "files": [
@@ -27,8 +27,8 @@
27
27
  "repository": "https://github.com/justeattakeaway/pie.git",
28
28
  "license": "Apache-2.0",
29
29
  "devDependencies": {
30
- "@types/postcss-import": "14.0.0",
31
- "postcss": "8.4.29",
30
+ "@types/postcss-import": "14.0.1",
31
+ "postcss": "8.4.31",
32
32
  "postcss-import": "15.1.0",
33
33
  "w3c-css-validator": "1.3.1"
34
34
  }
package/LICENSE DELETED
@@ -1,17 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- Copyright (c) Just Eat Takeaway.com
6
-
7
- Licensed under the Apache License, Version 2.0 (the "License");
8
- you may not use this file except in compliance with the License.
9
- You may obtain a copy of the License at
10
-
11
- http://www.apache.org/licenses/LICENSE-2.0
12
-
13
- Unless required by applicable law or agreed to in writing, software
14
- distributed under the License is distributed on an "AS IS" BASIS,
15
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- See the License for the specific language governing permissions and
17
- limitations under the License.