diff --git a/README.md b/README.md index 45b3bc2..a507570 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,20 @@ For example this SVG will be be a rectangle (`` tag) of 100 pixels width a ``` -Almost all SVG patterns come with no colors defined, which means colors will be automatically defined by two CSS rules: the `color` value and the `background` value on your `` element. +Colors are automatically defined by two CSS rules: the color value of the text (aka currentColor) and the background value on the div containing them (if none, the ). + +Two patterns (seigaiha and yinyang) default to a white background, which can be changed by using a css custom property. + +```css +#seigaiha, #yinyang { + --background: red; +} +``` -If you change those colors (for themes or dark mode), the patterns colors will change too accordingly. ## CSS Version -The CSS version uses the SVGs as base64 background images. Just include the classname to your existing html element and the pattern should appear. Please note that since this is a base64 encoding, you cannot change the colors when using the CSS version. +The CSS version is deprecated, and uses the SVGs as base64 background images. Include the classname to your existing html element and the pattern should appear. Please note that since this is a base64 encoding, you cannot change the colors when using the CSS version. ## License diff --git a/dist/moyo.svg b/dist/moyo.svg index 9fd6b3d..7562b57 100644 --- a/dist/moyo.svg +++ b/dist/moyo.svg @@ -1,188 +1,175 @@ - \ No newline at end of file + diff --git a/moyo.mjs b/moyo.mjs index 0d6b0fb..73f99e1 100644 --- a/moyo.mjs +++ b/moyo.mjs @@ -131,7 +131,7 @@ const patterns = [ `, - ` + `