Giter VIP home page Giter VIP logo

moyo's Introduction

MoyoMoyo

Moyo

Moyō 模様 (pattern) is a collection of patterns I use for my projects.

Demo

See the demo of all patterns on my website.

SVG version

Moyo in SVG comes as a single SVG file containing all the patterns. If you are not familiar with SVG, an SVG file can use a <defs> tag to store graphical objects that you will use later. Each pattern is defined inside the <pattern> tag and each one has an id attribute. Those ids can then be used inside other SVGs.

How to use

Copy paste the dist/moyo.svg file content inside your template and generate the desired SVG with the desired pattern.

For example this SVG will be be a rectangle (<rect> tag) of 100 pixels width and height and will use the checks pattern.

 <svg height="100" width="100">
    <rect style="fill: url(#checks);" height="100" width="100"></rect>
</svg>

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.

#seigaiha, #yinyang {
    --background: red;
}

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

Moyō 模様 is free to use by individuals and organizations that do not operate by capitalist principles. For more information see the license file.

moyo's People

Contributors

thomasorus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.