File: skip-to-content.scss

package info (click to toggle)
cockpit 358-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 317,272 kB
  • sloc: javascript: 775,788; python: 41,626; ansic: 33,970; cpp: 11,141; sh: 3,566; makefile: 581; xml: 262
file content (18 lines) | stat: -rw-r--r-- 611 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
@use '../../sass-utilities' as *;

@include pf-root($skip-to-content) {
  --#{$skip-to-content}--InsetBlockStart: var(--pf-t--global--spacer--md);
  --#{$skip-to-content}--ZIndex: var(--pf-t--global--z-index--2xl);
  --#{$skip-to-content}--focus--InsetInlineStart: var(--pf-t--global--spacer--md);
}

.#{$skip-to-content} {
  position: absolute;
  inset-block-start: var(--#{$skip-to-content}--InsetBlockStart);
  inset-inline-start: -300%; // moves off screen
  z-index: var(--#{$skip-to-content}--ZIndex);

  &:focus-within {
    inset-inline-start: var(--#{$skip-to-content}--focus--InsetInlineStart);
  }
}