Giter Site home page Giter Site logo

gridonic / sass Goto Github PK

View Code? Open in Web Editor NEW
4.0 9.0 0.0 516 KB

🍩 Our Sass foundation.

Home Page: http://sass-lang.com/

License: MIT License

CSS 73.01% HTML 13.85% JavaScript 12.22% Shell 0.92%
sass css boilerplate gridonic foundation sassdoc aigis rscss styleguide documentation

sass's Introduction

Sass

Sass foundation

This repository represents our starting point for creating sane, scalable and maintainable CSS.

💪 It’s empowered by:

  • Aigis (styleguide generator)
  • SassDoc (code documentation)
  • Gemini (utility for visual regression testing)

📚 Uses the following libraries by default:

🙏 Obeys those principles:

Have fun! ✌️

Wait, how am I supposed to use it?

Primarily it’s meant to be downloaded, extracted and used as a starting point that will grow/adjust from time to time while you work with it.

ℹ️ Meanwhile see the wiki for additional recipes on how to use this foundation.

Build setup

# install dependencies
npm install

# builds the css files
npm run build

# builds the css files in production mode (compressed)
npm run build:prod

# generates the styleguide
npm run styleguide

# generates the code documentation
npm run docs

# shows some statistics about the compiled css
npm run stats

# watches the sass files for changes and builds them automatically
# including the styleguide and the docs
npm run watch

# run visual regression tests and markup validation after css has been build
# and styleguide has been generated
npm run test

# checks the markup validity (of the styleguide or the files you’ve specified)
npm run test:html

# run visual regression tests only (doesn’t build and update styleguide beforehand)
npm run test:visual

gridonic.chgridonic.github.io@gridonic

sass's People

Contributors

peschee avatar ranuss avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sass's Issues

Improve color variable naming scheme

For a long time we’ve been using the double variables system, mostly in order to preserve the ability to easily create a themable stylesheet.

For example all basic colors were stored in variables beginning with $color-{{name}}: #e43e33;. Then we created color variables that made the semantic link to the actual color, like this: $color-background-primary: $color-cinnabar;

As I mentioned in the beginning we did that for a long time. By now I'm wondering if that‘s still necessary because I think we can switch to a single naming/variable system and still keep our options open regarding themability. Plus we would lose the tight coupling/chaining of semantic color variables.

So I would propose we handle it like this:

  1. Only use variables for color codes and name them after the color
  2. Place frequently (≥3⨉) used color variables in meta/_colors.scss
  3. Use color manipulating functions to create nuances (See Controlling color with Sass color functions for inspiration)

Yeah, gimme code. I need code.

$color-black: #000000;
$color-japanese-laurel: #06a20d;
$color-cinnabar: #e43e33;

// Far far down the Sass road…

.my-error {
    border: 1px solid darken($color-cinnabar, 10%);
    color: $color-cinnabar;
}

// 👆 If that darker red color comes up more then 2 times, 
// we’ll store it in a separate variable.

@gridonic/frontend Can I get a 👍?

Implement visual regression testing

In projects where we can heavily rely on a component-based development, visual regression testing would save us a lot of time especially when it comes to unintended changes/bugs related to refactoring.

See PhantomCSS for details. A simple test case (success and fail) should be provided.

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.