File tree Expand file tree Collapse file tree 10 files changed +35
-229
lines changed Expand file tree Collapse file tree 10 files changed +35
-229
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @rhds/elements " : patch
3
+ ---
4
+
5
+ ` <rh-back-to-top> ` : remove user-facing errors and warnings from missing attributes/values from the console
Original file line number Diff line number Diff line change 8
8
main {
9
9
display : block;
10
10
scroll-behavior : smooth;
11
- max-height : calc (100dvh - var (--pf-demo-header-height )) !important ;
11
+ max-block-size : calc (100dvh - var (--pf-demo-header-height )) !important ;
12
12
}
13
13
# bottom {
14
14
position : absolute;
15
- bottom : 0 ;
15
+ inset-block-end : 0 ;
16
16
}
17
17
# nav {
18
- height : calc (100dvh - var (--pf-demo-header-height , 4.375rem )); !important ;
18
+ block-size : calc (100dvh - var (--pf-demo-header-height , 4.375rem )); !important ;
19
19
}
20
20
</ style >
Original file line number Diff line number Diff line change 33
33
main {
34
34
display : block;
35
35
scroll-behavior : smooth;
36
- max-height : calc (100dvh - var (--pf-demo-header-height )) !important ;
36
+ max-block-size : calc (100dvh - var (--pf-demo-header-height )) !important ;
37
37
}
38
38
39
39
# nav {
40
- height : calc (100dvh - var (--pf-demo-header-height , 4.375rem )) !important ;
40
+ block-size : calc (100dvh - var (--pf-demo-header-height , 4.375rem )) !important ;
41
41
}
42
42
43
43
# overflow {
44
- min-height : calc (100dvh + 401px );
44
+ min-block-size : calc (100dvh + 401px );
45
45
position : relative;
46
46
}
47
47
48
48
# bottom {
49
49
position : absolute;
50
- bottom : 0 ;
50
+ inset-block-end : 0 ;
51
51
}
52
52
53
53
@media (prefers-reduced-motion : reduce) {
61
61
< script type ="module ">
62
62
/* add support for demo/fullscreen and dev server */
63
63
const b2t = document . querySelector ( 'rh-back-to-top' ) ;
64
- const main = document . querySelector ( 'main' ) ;
64
+ const main = document . querySelector ( 'main, [role="main"] ' ) ;
65
65
// if main isn't scrollable use window
66
66
if ( window . getComputedStyle ( main ) . overflow === 'scroll' ) {
67
67
b2t . scrollableSelector = 'main' ;
Original file line number Diff line number Diff line change 13
13
main {
14
14
display : block;
15
15
scroll-behavior : smooth;
16
- max-height : calc (100dvh - var (--pf-demo-header-height )) !important ;
16
+ max-block-size : calc (100dvh - var (--pf-demo-header-height )) !important ;
17
17
}
18
18
19
19
# nav {
20
- height : calc (100dvh - var (--pf-demo-header-height , 4.375rem )) !important ;
20
+ block-size : calc (100dvh - var (--pf-demo-header-height , 4.375rem )) !important ;
21
21
}
22
22
23
23
# overflow {
24
- min-height : calc (100dvh + 401px );
24
+ min-block-size : calc (100dvh + 401px );
25
25
position : relative;
26
26
}
27
27
28
28
# bottom {
29
29
position : absolute;
30
- bottom : 0 ;
30
+ inset-block-end : 0 ;
31
31
}
32
32
33
33
@media (prefers-reduced-motion : reduce) {
39
39
< script type ="module ">
40
40
/* add support for demo/fullscreen and dev server */
41
41
const b2t = document . querySelector ( 'rh-back-to-top' ) ;
42
- const main = document . querySelector ( 'main' ) ;
42
+ const main = document . querySelector ( 'main, [role="main"] ' ) ;
43
43
// if main isn't scrollable use window
44
44
if ( window . getComputedStyle ( main ) . overflow === 'scroll' ) {
45
45
b2t . scrollableSelector = 'main' ;
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
< div id ="overflow ">
2
+ < p > Scroll down to reveal the back to top element</ p >
2
3
< rh-back-to-top href ="# "> Back to top</ rh-back-to-top >
3
4
</ div >
4
5
5
6
< script type ="module ">
6
7
import '@rhds/elements/rh-back-to-top/rh-back-to-top.js' ;
7
8
</ script >
9
+
10
+ < style >
11
+ # overflow {
12
+ min-block-size : calc (100dvh + 401px );
13
+ }
14
+
15
+ p {
16
+ font-weight : bold;
17
+ }
18
+ </ style >
Original file line number Diff line number Diff line change 12
12
main {
13
13
display : block;
14
14
scroll-behavior : smooth;
15
- max-height : calc (100dvh - var (--pf-demo-header-height )) !important ;
15
+ max-block-size : calc (100dvh - var (--pf-demo-header-height )) !important ;
16
16
}
17
17
18
18
# nav {
19
- height : calc (100dvh - var (--pf-demo-header-height , 4.375rem )) !important ;
19
+ block-size : calc (100dvh - var (--pf-demo-header-height , 4.375rem )) !important ;
20
20
}
21
21
22
22
# overflow {
23
23
/* scroll distance set to 50px */
24
- min-height : calc (100dvh + 51px );
24
+ min-block-size : calc (100dvh + 51px );
25
25
position : relative;
26
26
}
27
27
28
28
# bottom {
29
29
position : absolute;
30
- bottom : 0 ;
30
+ inset-block-end : 0 ;
31
31
}
32
32
33
33
@media (prefers-reduced-motion : reduce) {
41
41
< script type ="module ">
42
42
/* add support for demo/fullscreen and dev server */
43
43
const b2t = document . querySelector ( 'rh-back-to-top' ) ;
44
- const main = document . querySelector ( 'main' ) ;
44
+ const main = document . querySelector ( 'main, [role="main"] ' ) ;
45
45
// if main isn't scrollable use window
46
46
if ( window . getComputedStyle ( main ) . overflow === 'scroll' ) {
47
47
b2t . scrollableSelector = 'main' ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments