Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Commit fe886b2

Browse files
committed
Fix playground
1 parent d25502e commit fe886b2

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

docs/src/modules/playground/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import cssnext from "../../../../src/index"
22
import { version as cssnextVersion } from "../../../../package"
3-
import messagesStyles from "../../../../src/option.messages.browser.styles"
3+
import messagesStyles from "./messages.styles"
44

55
const bullet = "›"
66

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/* eslint-disable max-len */
2+
// source: http://iconmonstr.com/warning-3-icon/
3+
const svgGradient = `
4+
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="125.7515" y1="307.4834" x2="125.7514" y2="-73.4854" gradientTransform="matrix(1 0 0 -1 -50 373)">
5+
<stop offset="0" style="stop-color:#428BCA"/>
6+
<stop offset="0.325" style="stop-color:#507DBF"/>
7+
<stop offset="1" style="stop-color:#5C71B6"/>
8+
</linearGradient>`
9+
const warningSVG = `
10+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
11+
width="512px" height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
12+
${ svgGradient }
13+
<path
14+
fill="url(#SVGID_1_)"
15+
d="M256.002,50C142.23,50,50,142.229,50,256.001C50,369.771,142.23,462,256.002,462C369.771,462,462,369.771,462,256.001C462,142.229,369.771,50,256.002,50z M256.46,398.518c-16.207,0-29.345-13.139-29.345-29.346c0-16.205,13.138-29.342,29.345-29.342c16.205,0,29.342,13.137,29.342,29.342C285.802,385.379,272.665,398.518,256.46,398.518zM295.233,158.239c-2.481,19.78-20.7,116.08-26.723,147.724c-1.113,5.852-6.229,10.1-12.187,10.1h-0.239c-6.169,0-11.438-4.379-12.588-10.438c-6.1-32.121-24.293-128.504-26.735-147.971c-2.94-23.441,15.354-44.171,38.977-44.171C279.674,113.483,298.213,134.488,295.233,158.239z"
16+
/>
17+
</svg>
18+
`.trim()
19+
/* eslint-enable max-len */
20+
21+
export default {
22+
display: "block",
23+
"white-space": "pre-wrap",
24+
25+
// not a problem for old browsers, box will still be on top of body
26+
position: "fixed",
27+
top: 0,
28+
left: 0,
29+
right: 0,
30+
"z-index": 10000, // just in case you know
31+
32+
"font-size": ".9em",
33+
padding: "1.5em 1em 1.5em 4.5em", // padding + background image padding
34+
35+
color: "#318edf",
36+
"background-color": "#fff",
37+
38+
background: (
39+
`url(
40+
"data:image/svg+xml;charset=utf-8,${encodeURIComponent(warningSVG)}"
41+
) 1em 1em / 2.5em 2.5em no-repeat, #fff`
42+
),
43+
44+
// sugar
45+
"border-bottom": "4px solid #318edf",
46+
"box-shadow": "0 0 .6em rgba(0,0,0, .25)",
47+
48+
// nice font
49+
"font-family": "Menlo, Monaco, monospace",
50+
}

0 commit comments

Comments
 (0)