@miljodirektoratet/md-css 5.8.0 → 5.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miljodirektoratet/md-css",
3
- "version": "5.8.0",
3
+ "version": "5.9.0",
4
4
  "description": "CSS for Miljødirektoratet",
5
5
  "author": "Miljødirektoratet",
6
6
  "main": "./src/index.css",
@@ -118,7 +118,7 @@
118
118
  cursor: pointer;
119
119
  line-height: 150%;
120
120
 
121
- &:focus-visible-visible {
121
+ &:focus-visible {
122
122
  outline: 2px solid var(--mdPrimaryColor);
123
123
  outline-offset: -2px;
124
124
  }
@@ -17,7 +17,7 @@
17
17
  font-weight: 600;
18
18
  }
19
19
 
20
- .md-select__button-wrapper:focus-visible-visible {
20
+ .md-select__button-wrapper:focus-visible {
21
21
  outline: 0;
22
22
  }
23
23
  .md-select__button {
@@ -64,7 +64,7 @@
64
64
  border-radius: 0;
65
65
  line-height: 150%;
66
66
 
67
- &:focus-visible-visible {
67
+ &:focus-visible {
68
68
  outline: 2px solid var(--mdPrimaryColor);
69
69
  outline-offset: -2px;
70
70
  }
@@ -94,7 +94,7 @@
94
94
  cursor: pointer;
95
95
  line-height: 150%;
96
96
 
97
- &:focus-visible-visible {
97
+ &:focus-visible {
98
98
  outline: 2px solid var(--mdPrimaryColor);
99
99
  outline-offset: -2px;
100
100
  }
package/src/index.css CHANGED
@@ -8,6 +8,7 @@
8
8
  @import './filelist/filelist.css';
9
9
  @import './accordionitem/accordionitem.css';
10
10
  @import './modal/modal.css';
11
+ @import './skipToMainContent/skipToMainContent.css';
11
12
  @import './stepper/stepper.css';
12
13
  @import './tile/tile.css';
13
14
  @import './tabs/tabs.css';
@@ -0,0 +1,11 @@
1
+ # Structure
2
+
3
+ To use the `SkipToMainContent` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
+
5
+ Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
+
7
+ See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
8
+
9
+ ```html
10
+ <a className="md-skip-to-main-content[:focus-visible]" href="#main-content-anchor">Skip to main content</a>
11
+ ```
@@ -0,0 +1,30 @@
1
+ .md-skip-to-main-content {
2
+ position: absolute;
3
+ transform: translateY(-100%);
4
+ display: flex;
5
+ opacity: 0;
6
+ height: 1px;
7
+ width: 1px;
8
+ background-color: var(--mdPrimaryColor);
9
+ padding: 0;
10
+ font-family: 'Open sans';
11
+ overflow: hidden;
12
+ white-space: nowrap;
13
+ }
14
+
15
+ .md-skip-to-main-content:focus-visible {
16
+ position: relative;
17
+ transform: translateY(0%);
18
+ height: auto;
19
+ overflow: visible;
20
+ width: 100%;
21
+ opacity: 1;
22
+ text-decoration: underline;
23
+ padding: 0.5rem 1rem;
24
+ line-height: 150%;
25
+ font-size: 1.125rem;
26
+ color: #fff;
27
+ justify-content: center;
28
+ white-space: initial;
29
+ outline: 0;
30
+ }