@primer/css 20.2.4 → 20.3.0-rc.79f6bc1b

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.
@@ -0,0 +1,155 @@
1
+ // stylelint-disable max-nesting-depth
2
+ // stylelint-disable primer/spacing
3
+ // stylelint-disable primer/borders
4
+
5
+ .AppFrame {
6
+
7
+ // AppFrame structure
8
+ // ===================
9
+ //
10
+ // .AppFrame
11
+ // ├─ .AppFrame-a11yNav
12
+ // │ ├─ .AppFrame-a11yLink
13
+ // │
14
+ // ├─ .AppFrame-main
15
+ // │ ├─ .AppFrame-header-wrapper
16
+ // │ │ ├─ .AppFrame-header
17
+ // │ │ ├─ .AppFrame-subheader
18
+ // │ │
19
+ // │ ├─ #start-of-content
20
+ // │ ├─ .AppFrame-body
21
+ // │ ├─ .AppFrame-footer
22
+
23
+ // Accessibility navigation
24
+
25
+ .AppFrame-a11yNav {
26
+ position: absolute;
27
+ z-index: 1000;
28
+ display: flex;
29
+ width: 100%;
30
+ padding: var(--base-size-16, 16px);
31
+ background: var(--color-canvas-inset);
32
+ padding-block-end: calc(var(--base-size-16, 16px) - var(--primer-borderWidth-thin, 1px));
33
+ isolation: isolate;
34
+ align-items: center;
35
+ gap: var(--base-size-8, 8px);
36
+
37
+ &:not(:focus-within) {
38
+ width: 1px;
39
+ height: 1px;
40
+ padding: 0;
41
+ margin: -1px;
42
+ overflow: hidden;
43
+ clip: rect(1px, 1px, 1px, 1px);
44
+ border: 0;
45
+ }
46
+
47
+ &:focus-within {
48
+ top: 0;
49
+ left: 0;
50
+
51
+ // Narrow viewport
52
+ @media (max-width: #{map-get($breakpoints, 'md') - 0.02px}) {
53
+ justify-content: center;
54
+ }
55
+ }
56
+ }
57
+
58
+ .AppFrame-a11yLink {
59
+ transition: none;
60
+
61
+ &:not(:focus) {
62
+ display: block;
63
+ width: var(--base-size-8, 8px);
64
+ height: var(--base-size-8, 8px);
65
+ overflow: hidden;
66
+ text-indent: var(--base-size-128, 128px);
67
+ pointer-events: none;
68
+ background: var(--color-border-default);
69
+ border-radius: var(--primer-borderRadius-full, 100vh);
70
+ }
71
+
72
+ &:focus {
73
+ z-index: 20;
74
+ display: grid;
75
+ width: auto;
76
+ height: auto;
77
+ min-height: var(--primer-control-medium-size, 32px);
78
+ padding: 0 var(--primer-control-medium-paddingInline-spacious, 16px);
79
+ overflow: auto;
80
+ color: var(--color-fg-on-emphasis);
81
+ background: var(--color-accent-emphasis);
82
+ border-radius: var(--primer-borderRadius-full, 100vh);
83
+ align-items: center;
84
+
85
+ @media (pointer: coarse) {
86
+ &::after {
87
+ @include minTouchTarget(var(--primer-control-minTarget-coarse, 44px));
88
+ }
89
+ }
90
+
91
+ @media (prefers-reduced-motion: no-preference) {
92
+ animation: AppFrame-a11yLink-focus 200ms ease-out;
93
+ }
94
+
95
+ @keyframes AppFrame-a11yLink-focus {
96
+ 0% {
97
+ color: var(--color-accent-emphasis);
98
+ transform: scale(0.3, 0.25);
99
+ }
100
+
101
+ 50% {
102
+ color: var(--color-accent-emphasis);
103
+ transform: scale(1, 1);
104
+ }
105
+
106
+ 55% {
107
+ color: var(--color-fg-on-emphasis);
108
+ }
109
+
110
+ 100% {
111
+ transform: scaleX(1);
112
+ }
113
+ }
114
+ }
115
+ }
116
+
117
+ .AppFrame-main {
118
+ display: flex;
119
+ min-height: 100vh;
120
+ flex-direction: column;
121
+
122
+ @supports (height: 100dvh) {
123
+ min-height: 100dvh;
124
+ }
125
+ }
126
+
127
+ .AppFrame-header-wrapper {
128
+ position: relative;
129
+ height: min-content;
130
+ overflow: visible;
131
+
132
+ .AppFrame-header {
133
+ position: sticky;
134
+ top: 0;
135
+ z-index: 1;
136
+ }
137
+ }
138
+
139
+ .AppFrame-header {
140
+ flex: 0 0 auto;
141
+ }
142
+
143
+ .AppFrame-subheader {
144
+ flex: 0 0 auto;
145
+ }
146
+
147
+ .AppFrame-body {
148
+ flex: 1 0;
149
+ height: 100%;
150
+ }
151
+
152
+ .AppFrame-footer {
153
+ flex: 0 0 auto;
154
+ }
155
+ }
package/layout/index.scss CHANGED
@@ -1,4 +1,5 @@
1
1
  @import '../support/index.scss';
2
+ @import './app-frame.scss';
2
3
  @import './mixins.scss';
3
4
  @import './container.scss';
4
5
  @import './grid.scss';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/css",
3
- "version": "20.2.4",
3
+ "version": "20.3.0-rc.79f6bc1b",
4
4
  "description": "The CSS implementation of GitHub's Primer Design System",
5
5
  "homepage": "https://primer.style/css",
6
6
  "author": "GitHub, Inc.",
@@ -52,11 +52,11 @@
52
52
  "autoprefixer": "10.4.7",
53
53
  "chokidar-cli": "3.0.0",
54
54
  "cssstats": "4.0.5",
55
- "eslint": "8.16.0",
55
+ "eslint": "8.18.0",
56
56
  "eslint-plugin-github": "4.3.6",
57
57
  "eslint-plugin-jest": "26.1.5",
58
58
  "eslint-plugin-prettier": "4.0.0",
59
- "filesize": "9.0.1",
59
+ "filesize": "9.0.11",
60
60
  "front-matter": "4.0.2",
61
61
  "fs-extra": "10.1.0",
62
62
  "globby": "13.1.1",