Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
astro-breakpoints
Advanced tools
Provides cross languages breakpoints handlers for your app. SCSS mixin, JS hook and a DOM data attribute, all share the same responsive scale you choose to feed in.
Provides cross languages breakpoints handlers for your app.
SCSS mixin, JS hook and a DOM data attribute, all share the same responsive scale you choose to feed in.
pnpm i astro-breakpoints
Warning
🚧 Documentation work is in progress
SCSS mixins registration in astro.config.mjs
:
// You can redefine breakpoints options.
// Also, putting in an external file,
// so you can share it with your JS environments.
const breakpoints = {
// These are default values
xs: '320px',
sm: '576px',
md: '768px',
lg: '992px',
xl: '1200px',
xxl: '1840px',
};
export default defineConfig({
// ...
vite: {
css: {
preprocessorOptions: {
scss: {
additionalData(source, filePath) {
// Exclude file, prevents module loop
if (filePath.includes('use-')) return source;
// if (filePath.includes('my-vars.scss')) return source;
return `
@use "astro-breakpoints/use-breakpoints.scss" as * with (
$breakpoints: (
"xs": ${breakpoints.xs},
"sm": ${breakpoints.sm},
"md": ${breakpoints.md},
"lg": ${breakpoints.lg},
"xl": ${breakpoints.xl},
"xxl": ${breakpoints.xxl},
)
);
${source}
`;
},
},
},
},
},
});
You can also use the bare helper with the default implicit breakpoints settings,
inside additionalData
:
`@use "astro-breakpoints/use-breakpoints.scss" as *;`;
Then, use it like this in your SCSS stylesheets:
.hippopotame {
padding: 2vw;
@include breakpoint(md) {
padding: 10vw;
}
@include breakpoint(xxl) {
padding: calc(10vw + 3rem);
}
}
<html data-breakpoint="xxl">
<!-- ... -->
</html>
FAQs
Provides cross languages breakpoints handlers for your app. SCSS mixin, JS hook and a DOM data attribute, all share the same responsive scale you choose to feed in.
We found that astro-breakpoints 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.