1.0.0 • Published 2 years ago

@lowereast/stoop v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

stoop npm version

Foundational styling for static sites. Stoop is intentionally limited, providing just enough at the core to keep (lightweight) static sites inline with our development practices. This is a legacy system and is no longer used on projects.

 

Stoop Kid: Its the greatest stoop I have ever seen. Arnold: Well, it's just one of the great stoops out there. And if you want to see em, all you have to do is take that one big step off your stoop.

*Stoop Kid: Its the greatest stoop I have ever seen. Arnold: Well, it's just one of the great stoops out there. And if you want to see em, all you have to do is take that one big step off your stoop.*  

Usage

Install Stoop from https://yarnpkg.com/package/stoop

yarn add stoop

Now, simply setup a sass import stylesheet in your project folder. We suggest the following:

@import "~stoop/src/app.scss";

You could use Stoop in it's compiled css form, however that isn't the intended use. Instead, import it to your app.css and you'll have access to all settings, mix-ins and utilities.

If you wish to override the default settings, you must define them in an .scss file before importing Stoop.

// @import "settings.scss;
@import "~stoop/src/app.scss;

Done. Enjoy. 🍷

Settings

VariablesDefaultUse Case
$type--parentsystemGlobal font.
$type--line-height1.6Base line height for relative units.
$type--baseline-size62.5%Base font size ☞ because 62.5% is equal to 10px in most browsers, so it makes it easier to calculate REM units.
$type--initial-size1.5remInitial font size.
$color--light#fffWhite, body background color.
$color--dark#000Black, body font color.
$color--linkrgb(19, 19, 19)Link color.
$set--transitionall 0.17s ease-in-outTransition speed for hovers.
$space--1, $space--2, $space--3. $space--4, $space--51rem, 3rem, 9rem, 12rem, 24remFixed spacing, for consistent padding and margins.
$break--1, $break--2, $break--3, $break--4600px, 900px, 1200px, 1800pxResponsive breakpoints, nothing fancy here.
$width--phone, $width--tablet, $width--laptop, $width--desktop95%, 95%, 128rem, 150remMax width for confined container for phone through desktop.
$width--wide-a, $width--wide-b95%, 175remMax width for confined container for ultrawides ☞ this sets a variable percentage based standard width and confines at a max width REM unit to cover a larger range of wide displays.

 

Classes & Selectors

ClassPurpose
.outerFull width outer container. No padding.
.innerConfined (max-width variable) inner container. Has horizontal padding.
.no-innerAdds horizontal padding to an outer div that doesn't have a corresponding inner. Keeps it pretty.
.rowA row, holds columns
.row.align-top, .align-bottom, .align-center, .align-baseline, .align-stretchAlign items for row. flex-start, flex-end, center, baseline respectively.
.column > then add size, eg s-50 and add offset if needed, eg o-25📱 Column, default 100% width unless s- added. Percentage based sizes.
.hidden📱 Globally hide an element, or use on a screen size specific level.
.visible📱 Shows a hidden element, probably on a screen size specific level.
.type-r, .type-c, .type-l, .type-j📱 Text align right, center, left, justify respectively.
.type-i, .type-is📱 Inline text positioning, with .type-is including horizontal padding (is = inline spaced).
.p-t-{size} eg .p-t-3📱 Add padding top at an element level.
.p-b-{size} eg .p-b-3📱 Add padding bottom at an element level.

Responsive classes

Classes with the lil 📱 icon have screen size classes available. These are all as follows, column size used as an example -

// .class-phone, .class-tablet, .class-laptop, .class-desktop, .class-wide
.column.s-50-phone

Column sizes and offsets

These sizes are also available for specific screen size breakpoints, and are identical to offsets (s-10/o-10).

5, 10, 15, 20. 25. 30. 33, 35, 40. 50, 60. 65, 66, 70, 75, 80, 85, 90, 95

Padding options

Either padding top or padding bottom. Used for responsive spacing for stacked columns mostly.

0 = removes padding,
1-h = ($space--1 / 2),
1 = $space--1,
2 = $space--2,
3 = $space--3,
4 = $space--4,
5 = $space--5;

Contributing

We would love contributions, in particular keeping it fresh and neat as some aspects of the project may fall behind with evolving standards.

yarn install
yarn watch
1.0.0

2 years ago