Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
sass-direction
Advanced tools
Sass mixins and functions to help creating bi-directional stylesheets.
Compatibility: Sass and LibSass
Download _direction.scss
or install with npm or Bower :
npm install sass-direction
bower install sass-direction
app.scss
@import "direction";
h1 {
text-align: direction(left);
margin-#{direction(right)}: 1em;
padding: direction-sides(1em 2em 3em 4em);
border: direction-corners(1em 2em 3em 4em);
font-size: direction-if(ltr, 1em, 2em);
line-height: direction-if(rtl, 2);
@include direction-if(ltr) {
&::before {
content: "left to right";
}
}
@include direction-if(rtl) {
&::after {
content: "right to left";
}
}
}
app-rtl.scss
$direction: rtl;
@import "app";
app.css
h1 {
text-align: left;
margin-right: 1em;
padding: 1em 2em 3em 4em;
border: 1em 2em 3em 4em;
font-size: 1em;
}
h1::before {
content: "left to right";
}
app-rtl.css
h1 {
text-align: right;
margin-left: 1em;
padding: 1em 4em 3em 2em;
border: 2em 1em 4em 3em;
font-size: 2em;
line-height: 2;
}
h1::after {
content: "right to left";
}
direction-ltr($if, $else)
: direction-if(ltr, $if, $else)
direction-rtl($if, $else)
: direction-if(rtl, $if, $else)
direction-ltr
: direction-if(ltr)
direction-rtl
: direction-if(rtl)
Hugely based on Tyson Matanich’s idea.
FAQs
Sass mixins and functions to help creating bi-directional stylesheets.
The npm package sass-direction receives a total of 487 weekly downloads. As such, sass-direction popularity was classified as not popular.
We found that sass-direction demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.