Coder Social home page Coder Social logo

utopian-sass's Introduction

About

utopian-sass is a Sass module adaption of Utopia for fluid responsive design. It is recommended you read about the generator here if you haven't already.

Getting Started

First thing to do is to install the package:

npm install utopian-sass

Then in your Sass, load the module like so:

@use '../node_modules/utopian-sass/utopian.scss';

This will generate fluid responsive CSS properties according to the default settings of the module.

Configuration

utopian-sass uses configurable default values in its generation, which correspond to the options available in the generator, as well as options for prefixing the generated CSS properties. They appear in the codebase as follows:

$min-width: 320 !default;
$min-size: 21 !default;
$min-scale: 1.2 !default;

$max-width: 1140 !default;
$max-size: 24 !default;
$max-scale: 1.25 !default;

$neg-steps: 2 !default;
$pos-steps: 5 !default;

$prefix: 'fluid' !default;
$step-prefix: 'step' !default;

Any of these values can be configured when loading the module with the @use rule, for example:

@use '../node_modules/utopian-sass/utopian.scss' with (
  $pos-steps: 7,
  $min-size: 18,
  $max-size: 22
);

NB: Ensure that when providing values for variables that contain numbers, you provide numbers that are unitless. Doing otherwise will likely lead to generated CSS properties that have no affect, and currently the module will not warn you if configured incorrectly.

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.