Skip to content

Commit 5580d08

Browse files
committed
Correcting the svg issue also for alternate theme
Glitches on Safari iOS #138
1 parent 2e32a8d commit 5580d08

7 files changed

+13
-24
lines changed

build/cpu-audio.direct-download.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/cpu-audio.direct-download.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/cpu-audio.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/cpu-audio.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/themes/default/scoped.css

+4-5
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ b, strong, h5 a {
8686
align-self: center;
8787
}
8888

89-
#control,
90-
#actions {
89+
.siders {
9190
flex : 0 0 var(--cpu-height);
9291
width : var(--cpu-height);
9392
max-height : var(--cpu-height);
@@ -151,7 +150,7 @@ b, strong, h5 a {
151150
opacity: 1;
152151
}
153152

154-
#control svg, #actions svg {
153+
.siders svg {
155154
vertical-align : middle;
156155
max-width : 100%;
157156
max-height : 100%;
@@ -545,8 +544,8 @@ a:hover, button:hover, a:focus, button:focus,
545544
padding-bottom: 2px;
546545
}
547546

548-
#control svg, #actions svg {
549-
/* Safari iOS is unable to recalc correctly. Keep this.. See https://github.com/dascritch/cpu-audio/issues/138 */
547+
.siders svg {
548+
/* Safari iOS is unable to recalc correctly. See https://github.com/dascritch/cpu-audio/issues/138 */
550549
height : calc(var(--cpu-height) - 16px);
551550
}
552551
}

src/themes/default/template.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!-- Here are inserted messages from cpu-audio.CPU.updateError(). Perhaps we should hide them at some sizes. And also put an ellipsis in css -->
66
</section>
77
<section id="pagemain">
8-
<button type="button" id="control" tabindex="0">
8+
<button type="button" id="control" tabindex="0" class="siders">
99
<!-- play / pause / loading -->
1010
<svg id="loading" viewBox="0 0 32 32">
1111
<title>${__.loading}</title>
@@ -73,7 +73,7 @@ <h5 id="title"><a href="#" id="canonical" aria-label="${__.canonical}"><!-- titl
7373
<!-- here are inserted tracks for _chapters, cursors,… -->
7474
</div>
7575
</div>
76-
<button id="actions" aria-label="${__.more}" title="${__.more}">
76+
<button id="actions" aria-label="${__.more}" title="${__.more}" class="siders">
7777
<svg viewBox="0 0 32 32" aria-hidden="true">
7878
<circle cx="7" cy="16" r="3" />
7979
<circle cx="16" cy="16" r="3" />

src/themes/direct-download/template.html

+3-13
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<section id="pageerror" role="alert">
1111
</section>
1212
<section id="pagemain">
13-
<button type="button" id="control" tabindex="0">
13+
<button type="button" id="control" tabindex="0" class="siders">
1414
<!-- play / pause / loading -->
1515
<svg id="loading" viewBox="0 0 32 32" aria-hidden="true">
1616
<title>${__.loading}</title>
@@ -75,7 +75,7 @@ <h5 id="title"><a href="#" id="canonical" aria-label="${__.canonical}"></a></h5>
7575
</div>
7676
</div>
7777
</div>
78-
<a href="#" target="social" id="link" aria-label="${__.download}" title="${__.download}" download>
78+
<a href="#" target="social" id="link" aria-label="${__.download}" title="${__.download}" download class="siders">
7979
<!--
8080
download link, instead of the actions button.
8181
Even if the webcomponent will try to guess which is the prefered source for the clien platform, you can precise which link is to be downloaded :
@@ -97,17 +97,7 @@ <h5 id="title"><a href="#" id="canonical" aria-label="${__.canonical}"></a></h5>
9797
<style>
9898
/* Not the recommended way, but I didn't want to copy the whole scoped.css for invalidate only one^w a couple of rules */
9999
#link {
100-
background : none !important;,
101-
flex : 0 0 var(--cpu-height);
102-
width : var(--cpu-height);
103-
max-height : var(--cpu-height);
104-
height : 100%;
105-
text-align : center;
106-
vertical-align : middle;
107-
}
108-
#link svg {
109-
max-width: 100%;
110-
max-height: 100%;
100+
background : none !important;
111101
}
112102
#link:hover, #link:focus {
113103
background: var(--cpu-focus-background, var(--cpu-color)) !important;

0 commit comments

Comments
 (0)