File tree 5 files changed +17
-38
lines changed
5 files changed +17
-38
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,10 @@ export function initialize(/* application */) {
109
109
selfExecutingBlock += ` <div class="doc-code-block__code-rendered">` ;
110
110
selfExecutingBlock += ` ${ inputCodeblock } ` ;
111
111
selfExecutingBlock += ' </div>' ;
112
- selfExecutingBlock += ` <Doc::CopyButton @id='${ blockUniqueId } ' @type="solid" @textToCopy='${ codeblockEncoded } ' @encoded={{true}} aria-labelledby="copy-label-${ blockUniqueId } pre-block-${ blockUniqueId } "/>` ;
113
- selfExecutingBlock += ` ${ preBlock } ` ;
112
+ selfExecutingBlock += ' <div class="doc-code-block__code-snippet-wrapper">' ;
113
+ selfExecutingBlock += ` <Doc::CopyButton @id='${ blockUniqueId } ' @type="solid" @textToCopy='${ codeblockEncoded } ' @encoded={{true}} aria-labelledby="copy-label-${ blockUniqueId } pre-block-${ blockUniqueId } "/>` ;
114
+ selfExecutingBlock += ` ${ preBlock } ` ;
115
+ selfExecutingBlock += ' </div>' ;
114
116
selfExecutingBlock += '</div>' ;
115
117
116
118
if ( attributeString . includes ( 'data-execute=false' ) ) {
Original file line number Diff line number Diff line change 11
11
// Notice: vertical spacing is declared in `/styles/spacing`
12
12
13
13
.doc-code-block {
14
- position : relative ;
15
- z-index : 2 ;
16
14
border-radius : 3px ;
17
-
18
- .doc-copy-button {
19
- position : absolute ;
20
- right : 13px ;
21
- margin-top : 13px ;
22
- }
23
15
}
24
16
25
17
.doc-code-block__code-rendered {
26
- position : relative ;
27
- z-index : 1 ;
28
18
padding : 16px ;
29
19
background-image : url (" data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2 2'%3E%3Cpath d='M1 2V0h1v1H0v1z' fill-opacity='.05'/%3E%3C/svg%3E" );
30
20
// use this to fine tune the size of the checkered pattern
43
33
}
44
34
}
45
35
36
+ .doc-code-block__code-snippet-wrapper {
37
+ position : relative ;
38
+
39
+ .doc-copy-button {
40
+ position : absolute ;
41
+ right : 13px ;
42
+ margin-top : 13px ;
43
+ }
44
+ }
45
+
46
46
// notice: in some cases it's rendered as standalone element, so we have to have
47
47
.doc-code-block__code-snippet {
48
48
padding : 16px ;
Original file line number Diff line number Diff line change 7
7
position : fixed ;
8
8
right : 40px ;
9
9
bottom : 40px ;
10
- z-index : 99 ;
10
+ z-index : 48 ; // Needs to be below z-index of hds-dialog-primitive__overlay
11
11
width : 44px ;
12
12
height : 44px ;
13
13
padding : 8px ;
Original file line number Diff line number Diff line change @@ -58,19 +58,6 @@ body.application.index {
58
58
// ALL THE OTHER PAGES
59
59
60
60
body .application :not (.index ) {
61
- // if dialog is open, set sidebar z-index to 1
62
- & .doc-page-wrapper :has (dialog [open ]),
63
- & .doc-page-wrapper :has (.hds-code-editor--is-full-screen ) {
64
- --doc-z-index-sidebar : 1 ;
65
-
66
- .doc-scroll-to-top {z-index : 1 ;}
67
- }
68
-
69
- // if code editor is in full screen mode, set page header & scroll to top z-index to 1
70
- & .doc-page-wrapper :has (.hds-code-editor--is-full-screen ) {
71
- .doc-page-header , .doc-scroll-to-top {z-index : 1 ;}
72
- }
73
-
74
61
// Notice: for `display` and animation/transition look below
75
62
.doc-page-sidebar {
76
63
position : fixed ;
Original file line number Diff line number Diff line change 36
36
@include breakpoint .x-large () {
37
37
padding : 24px var (--doc-page-stage-gutter-x-large ) 0 ;
38
38
}
39
- }
40
39
41
- // Make tabs position sticky/fixed if:
42
- // * the viewport height is greater than 480px AND
43
- // * dialog is NOT open
44
- // * code editor is NOT in full screen mode
45
- .doc-page-wrapper
46
- :not (:has (dialog [open ]))
47
- :not (:has (.hds-code-editor--is-full-screen )) {
48
40
@media (height >= 480px ) {
49
- .doc-page-tabs {
50
- position : sticky ;
51
- top : var (--doc-page-header-height );
52
- }
41
+ position : sticky ;
42
+ top : var (--doc-page-header-height );
53
43
}
54
44
}
55
45
You can’t perform that action at this time.
0 commit comments