
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@mangoweb/sass-base
Advanced tools
The manGoweb template for sass styles employed on small to medium sized projects.
@mangoweb/sass-baseThe 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/…'
emTurns 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.remTurns 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)toScalarConverts a dimensioned value to a scalar
line-height: toScalar(1.5em) // line-height: 1.5
absoluteUsage:
+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: 2pxAll the other position mixins (fixed, relative, sticky) behave identically
clearFixJust a simple clear fix
fixedSee absolute
fluidSignature: 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)
mediaA 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)relativeSee absolute
sizeUsage
+size(100%) // width: 100%; height: 100%
+size(123px 456px) // width: 123px; height: 456px
stickySee 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.
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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.