Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@mangoweb/sass-base
Advanced tools
The manGoweb template for sass styles employed on small to medium sized projects.
@mangoweb/sass-base
The manGoweb template for sass styles employed on small to medium sized projects. It defines abstract definitions, animation keyframes, functions, mixins, a global reset as well as a couple of other utility classes.
$ npm install @mangoweb/sass-base
⚠️ You might want to also fix the package version so that any potential future backwards incompatibilities don't break your build. This package is generally intended for live development with the occasional BC break. Should that affect your application because you failed to fix the version, that's on you.
If you don't wish to modify anything, just import everything:
@import '~@mangoweb/sass-base/index'
To gain a finer control over what and how is imported, you might want to follow these steps:
Create a _variable.sass
file from which you can override any variable defined in ~@mangoweb/sass-base/variables
.
Create a _common.sass
file:
@import 'variables'
@import '~@mangoweb/sass-base/common'
This allows you to define your variables before you import sass-base
, thereby overriding its defaults.
You should later import this file from all your other files (e.g. other components) in order to avoid relying on implicit importing.
Create an index.sass
file:
@import 'common'
@import '~@mangoweb/sass-base/index'
/* Any other components of yours */
@import 'parts/…'
em
Turns a (potentially unitless) number in pixels into em
Usage:
em(16)
returns 1em
(based on $font-size
)em(16px)
returns 1em
(based on $font-size
)em(10px)
returns .625em
(based on $font-size
)em(10px, 10px)
returns 1em
where $font-size
is the second parameter which defaults to $base-font-size
, which is typically 16px
.rem
Turns a (potentially unitless) number in pixels into rem
Usage:
rem(16)
returns 1rem
(based on $base-font-size
)rem(16px)
returns 1rem
(based on $base-font-size
)toScalar
Converts a dimensioned value to a scalar
line-height: toScalar(1.5em) // line-height: 1.5
absolute
Usage:
+absolute(top right bottom left)
+absolute(top horizontal bottom)
+absolute(vertical horizontal)
+absolute(offset)
Examples:
+absolute(1px 2px 3px 4px)
compiles to
// position: absolute; top: 1px; right: 2px; bottom: 3px; left: 4px
+absolute(1px 2px 3px)
compiles to
// position: absolute; top: 1px; right: 2px; bottom: 3px; left: 2px
+absolute(1px 2px)
compiles to
// position: absolute; top: 1px; right: 2px; bottom: 1px; left: 2px
+absolute(1px)
compiles to
// position: absolute; top: 1px; right: 1px; bottom: 1px; left: 1px
+absolute(1px null null 2px)
compiles to
// position: absolute; top: 1px; left: 2px
All the other position mixins (fixed
, relative
, sticky
) behave identically
clearFix
Just a simple clear fix
fixed
See absolute
fluid
Signature: fluid($property-name, $min-viewport-width, $max-viewport-width, $min-value, $max-value)
Allows you to set a property value to a linearly interpolated value with respect to the viewport width.
Example:
.foo
+fluid(font-size, 0em, 45em, 0em, 1.5em)
media
A helper mixin for @media queries
Usage:
+media(mediaQuery [, mediaQuery]*)
foo: bar
/* … */
where mediaQuery is a sass list of one of
Examples:
+media($break480 $break768M, $break992 $break1200M)
compiles to
@media (min-width: 30em) and (max-width: 47.96875em), (min-width: 62em) and (max-width: 74.96875em)
+media(123)
compiles to
@media (min-width: 7.6875em)
+media(123M)
compiles to
@media (max-width: 123px)
+media(123em maxWidth(456em))
compiles to
@media (min-width: 123em) and (max-width: 455.96875em)
+media($break480 '(screen)', 300 maxWidth(500px), $landscape)
compiles to
@media (min-width: 30em) and (screen), (min-width: 18.75em) and (max-width: 31.21875em), (orientation: landscape)
relative
See absolute
size
Usage
+size(100%) // width: 100%; height: 100%
+size(123px 456px) // width: 123px; height: 456px
sticky
See absolute
There are more to list here. Please refer to _variables.sass
.
FAQs
The manGoweb template for sass styles employed on small to medium sized projects.
The npm package @mangoweb/sass-base receives a total of 20 weekly downloads. As such, @mangoweb/sass-base popularity was classified as not popular.
We found that @mangoweb/sass-base demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.