File tree 2 files changed +81
-30
lines changed
special-pages/pages/duckplayer/app/components
2 files changed +81
-30
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ export function PlayerError({ kind, layout }) {
96
96
class = { cn ( styles . root , {
97
97
[ styles . desktop ] : layout === 'desktop' ,
98
98
[ styles . mobile ] : layout === 'mobile' ,
99
+ [ styles . errorContainer ] : true ,
99
100
} ) }
100
101
>
101
102
{ kind === 'invalid-id' && < InvalidIdError kind = { kind } /> }
@@ -132,17 +133,19 @@ export function YouTubeError({ kind }) {
132
133
< div className = { styles . youtubeErrorContainer } >
133
134
< span className = { styles . youtubeErrorIcon } > </ span >
134
135
135
- < h1 className = { styles . youtubeErrorHeading } > { heading } </ h1 >
136
+ < div className = { styles . youtubeErrorText } >
137
+ < h1 className = { styles . youtubeErrorHeading } > { heading } </ h1 >
136
138
137
- { message && < p className = { styles . youtubeErrorMessage } > { message } </ p > }
139
+ { message && < p className = { styles . youtubeErrorMessage } > { message } </ p > }
138
140
139
- { solutions && (
140
- < ul className = { styles . youtubeErrorList } >
141
- { solutions . map ( ( item ) => (
142
- < li > { item } </ li >
143
- ) ) }
144
- </ ul >
145
- ) }
141
+ { solutions && (
142
+ < ul className = { styles . youtubeErrorList } >
143
+ { solutions . map ( ( item ) => (
144
+ < li > { item } </ li >
145
+ ) ) }
146
+ </ ul >
147
+ ) }
148
+ </ div >
146
149
</ div >
147
150
</ div >
148
151
) ;
Original file line number Diff line number Diff line change 56
56
column-gap : 24px ;
57
57
row-gap : 4px ;
58
58
grid-template-areas :
59
- "icon heading"
60
- "icon message"
61
- "icon list" ;
59
+ "icon"
60
+ "text" ;
62
61
max-width : 680px ;
63
- padding : 0 40px ;
62
+ padding : 0 24px ;
63
+ margin : 16px 0 ;
64
+
65
+ @media screen and (min-width : 600px ) {
66
+ grid-template-areas :
67
+ "icon text" ;
68
+ padding : 0 40px ;
69
+ margin : 0 ;
70
+ }
64
71
}
65
72
66
- .youtubeErrorIcon {
67
- align-self : start;
68
- background : url ('../img/warning-96.data.svg' ) no-repeat;
69
- display : block;
70
- height : 48px ;
71
- width : 48px ;
73
+ .youtubeErrorText {
74
+ display : flex;
75
+ flex-direction : column;
76
+ gap : 4px ;
77
+ grid-area : text;
78
+ margin : 16px 0 ;
79
+
80
+ @media screen and (min-width : 600px ) {
81
+ margin : 24px 0 ;
82
+ }
83
+ }
72
84
85
+ .youtubeErrorIcon {
86
+ align-self : center;
87
+ display : flex;
73
88
grid-area : icon;
89
+ justify-content : center;
90
+
91
+ & ::before {
92
+ content : ' ' ;
93
+ display : block;
94
+ background : url ('../img/warning-96.data.svg' ) no-repeat;
95
+ height : 48px ;
96
+ width : 48px ;
97
+ }
74
98
75
99
@media screen and (min-width : 600px ) {
76
- align-self : start;
77
- background-image : url ('../img/warning-128.data.svg' );
78
- height : 96px ;
79
- width : 128px ;
100
+ justify-content : start;
101
+
102
+ & ::before {
103
+ background-image : url ('../img/warning-128.data.svg' );
104
+ height : 96px ;
105
+ width : 128px ;
106
+ }
80
107
}
81
108
}
82
109
83
110
.youtubeErrorHeading {
84
- font-size : 20 px ;
111
+ font-size : 16 px ;
85
112
font-weight : 700 ;
86
- line-height : calc (24 / 20 );
113
+ line-height : calc (20 / 16 );
87
114
margin : 0 ;
88
115
89
116
grid-area : heading;
117
+
118
+ @media screen and (min-width : 600px ) {
119
+ font-size : 20px ;
120
+ line-height : calc (24 / 20 );
121
+ }
90
122
}
91
123
92
124
.youtubeErrorMessage {
93
125
color : # ccc ;
94
- font-size : 14 px ;
95
- line-height : calc (20 / 14 );
126
+ font-size : 13 px ;
127
+ line-height : calc (18 / 13 );
96
128
margin : 0 ;
97
129
98
130
grid-area : message;
131
+
132
+ @media screen and (min-width : 600px ) {
133
+ font-size : 14px ;
134
+ line-height : calc (20 / 14 );
135
+ }
99
136
}
100
137
101
138
.youtubeErrorList {
102
139
color : # ccc ;
103
- font-size : 14px ;
104
- line-height : calc (20 / 14 );
140
+ font-size : 13px ;
141
+ line-height : calc (18 / 13 );
142
+
143
+ grid-area : list;
105
144
106
145
li {
107
146
list-style : disc;
108
147
margin-left : 20px ;
109
148
}
110
149
111
- grid-area : list
150
+ @media screen and (min-width : 600px ) {
151
+ font-size : 14px ;
152
+ line-height : calc (20 / 14 );
153
+ }
112
154
}
113
155
114
156
@media screen and (min-width : 600px ) and (max-height : 450px ) {
128
170
border-radius : 0 ;
129
171
}
130
172
}
173
+
174
+ @media screen and (max-width : 600px ) {
175
+ .errorContainer .errorContainer {
176
+ aspect-ratio : unset;
177
+ }
178
+ }
You can’t perform that action at this time.
0 commit comments