Giter Site home page Giter Site logo

jhildenbiddle / vertical-rhythm-reset Goto Github PK

View Code? Open in Web Editor NEW
74.0 5.0 6.0 593 KB

A Sass/SCSS library for responsive vertical rhythm grids, modular scale typography, and CSS normalization.

Home Page: https://jhildenbiddle.github.io/vertical-rhythm-reset/

License: MIT License

SCSS 87.39% JavaScript 12.61%
css sass sass-mixins scss scss-mixins mixin modular-scale normalize reset vertical-rhythm

vertical-rhythm-reset's Introduction

Vertical Rhythm Reset

NPM GitHub Workflow Status (master) Codacy grade License: MIT Sponsor this project

A Sass/SCSS library for responsive vertical rhythm grids, modular scale typography, and CSS normalization.

Screenshot

screenshot

Features

  • Simplified vertical rhythm grids
    Maintain visual symmetry by aligning elements to an invisible-yet-recognizable layout pattern.

  • Modular scale typography
    Bring harmony to your typography using a calculated range of proportional font sizes.

  • CSS reset & normalization
    Standardize the default presentation of HTML5 elements across desktop and mobile browsers.

  • Responsive layout support
    Define custom breakpoints, each with their own vertical rhythm and typography settings.

  • Customizable utility classes
    Create pixel-perfect layouts in less time and without the need for custom classes.

  • Fast-and-easy implementation
    As little as two lines of code generates the CSS foundation for you project.

Browser Support

  • Chrome 19+
  • Edge
  • Firefox 4+
  • Internet Explorer 9+
  • Safari 6+

Sass Support

  • Dart Sass

Installation & Usage

See the documentation site for details.

Credits & Attribution

Sponsorship

A sponsorship is more than just a way to show appreciation for the open-source authors and projects we rely on; it can be the spark that ignites the next big idea, the inspiration to create something new, and the motivation to share so that others may benefit.

If you benefit from this project, please consider lending your support and encouraging future efforts by becoming a sponsor.

Thank you! ๐Ÿ™๐Ÿป

Contact & Support

  • Follow ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป @jhildenbiddle on Twitter and GitHub for announcements
  • Create a ๐Ÿ’ฌ GitHub issue for bug reports, feature requests, or questions
  • Add a โญ๏ธ star on GitHub and ๐Ÿฆ tweet to promote the project
  • Become a ๐Ÿ’– sponsor to support the project and future efforts

License

This project is licensed under the MIT license.

Copyright (c) John Hildenbiddle (@jhildenbiddle)

vertical-rhythm-reset's People

Contributors

jhildenbiddle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vertical-rhythm-reset's Issues

Deprecated dependencies

    LibSass 3.2+
    Ruby Sass 3.4+

The libraries are deprecated. (https://sass-lang.com/blog/libsass-is-deprecated, https://sass-lang.com/ruby-sass)

Using the dependencies in this repository with latest LTS node (gallium):

"devDependencies": {
"browser-sync": "^2.27.5",
"markdownlint-cli": "^0.28.1",
"node-sass": "^6.0.1",
"nodemon": "^2.0.12",
"rimraf": "^3.0.2",
"sassdoc": "^2.7.3"
}

13 vulnerabilities (4 moderate, 9 high)

Is it fruitful to hope for a project update?

Unordered lists in Firefox

I wondered why the grid was off and scrolled up to here to find the culprit. Seems to only affect Firefox.
image

Make modular scale function public

I really love the sparse simplicity of the core vr() method. That said, I do occasionally find need to reference scale values outside of the mixin's parameters. Skimming thru your source code, I found the internal _modular_scale method, which I assume is being used to calculate each step value.

I was wondering if it'd be possible to update this internal function so it can be used as a public utility? (Maybe even alias it to an ms shorthand, consistent with the vr naming convention!) That way one could write:

@import "vertical-rhythm-reset";
$vr-modular-scale: 1.33;

.example {
  @include vr($padding-top: 1);
  position: relative;
  top: -1 * ms(1); // modular scale shorthand alias
}

And that ms function would automatically pull in the $vr-modular-scale global and output the same step value as the above vr calculation.

Let me know if that makes sense. Happy to clarify if/where I can!

Reset is resetting a little too hard, maybe?

Hello!

I wonder why in the reset we have this line:

*,
*:before,
*:after {
  /* some properties */
  font: inherit;
}

Why the entire font, and not just font-family and font-size ? They're the only properties that could affect vertical rhythm, aren't they? The current problem I have with this is that font-weight and font-style are forced to "normal", so I have to re-style i, and em and strong. Is it normal, is it intentional?

On another topic: vertical-align: bottom kind of break sup and sub, it would be nice to give them again their respective alignments of "super" and "sub" in the reset. Would you like me to create a PR for that?

gulp-sass v2.3.2 (libsass?) incompatibility

Tested your SCSS using gulp-sass v2.3.2 and it stopped my gulp task.
It didn't throw me an error, it just stopped.

Then tested it in http://www.sassmeister.com/, selected LibSass v3.3.6 and it didn't compile it as well.

Testing it further with Sass v3.3.14 it gave me the Error "Functions can only contain variable declarations and control directives.".

It works with regular ruby sass v3.4.22 (I installed gulp-ruby-sass v2.1.0).
I'm not sure what the problem is and couldn't narrow it down but I'm assuming that how some functions were written could be the cause.

Maybe add a heads up in the readme before the problem is solved and so than others don't have to spend many hours finding out what the problem is.

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.