Skip to content

Commit c665d57

Browse files
authored
Merge pull request #5 from hanneskuettner/fix-background-urls
Add quotes in background-image urls
2 parents 686f850 + d4c3799 commit c665d57

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: src/index.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ const forms = plugin(function ({ addBase, theme }) {
6565
},
6666

6767
select: {
68-
'background-image': `url(${svgToDataUri(
68+
'background-image': `url("${svgToDataUri(
6969
`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="${theme(
7070
'colors.gray.400',
7171
colors.gray[400]
7272
)}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/></svg>`
73-
)})`,
73+
)}")`,
7474
'background-position': `right ${spacing[2]} center`,
7575
'background-repeat': `no-repeat`,
7676
'background-size': `1.5em 1.5em`,
@@ -143,15 +143,15 @@ const forms = plugin(function ({ addBase, theme }) {
143143
},
144144

145145
[`[type='checkbox']:checked`]: {
146-
'background-image': `url(${svgToDataUri(
146+
'background-image': `url("${svgToDataUri(
147147
`<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>`
148-
)})`,
148+
)}")`,
149149
},
150150

151151
[`[type='radio']:checked`]: {
152-
'background-image': `url(${svgToDataUri(
152+
'background-image': `url("${svgToDataUri(
153153
`<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>`
154-
)})`,
154+
)}")`,
155155
},
156156

157157
[`
@@ -165,9 +165,9 @@ const forms = plugin(function ({ addBase, theme }) {
165165
},
166166

167167
[`[type='checkbox']:indeterminate`]: {
168-
'background-image': `url(${svgToDataUri(
168+
'background-image': `url("${svgToDataUri(
169169
`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8h8"/></svg>`
170-
)})`,
170+
)}")`,
171171
'border-color': `transparent`,
172172
'background-color': `currentColor`,
173173
'background-size': `100% 100%`,

0 commit comments

Comments
 (0)