
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Baseguide is a lightweight and robust CSS framework for prototyping and production code.
This is great for prototyping, but doesn’t allow any customization. To load Baseguide via unpkg, add this to your <head>
:
<link rel="stylesheet" href="https://unpkg.com/baseguide@3.2.0/dist/css/baseguide.min.css">
npm: npm install baseguide
yarn: yarn add baseguide
Use npm install
or yarn install
to install the dev dependencies.
The included gulpfile takes care of compiling, optimizing and minifying your assets.
Command | Description |
---|---|
gulp | Build files, watch for changes and start a local server using Browsersync |
gulp build | Build files once |
gulp watch | Watch files and build when a change occurs |
Default variables can be changed before importing Baseguide. Take a look at the _settings.scss file to see all variables.
$button-bg: #bada55; // 1. Customize default variables
@import 'baseguide'; // 2. Import Baseguide
// 3. Add your own styles here
Breakpoints can easily be configured using the $mq-breakpoints
map. Note that the breakpoints have to be sorted from small to large.
The default configuration looks like this:
$mq-breakpoints: (
xs: 0,
sm: 400px,
md: 680px,
lg: 960px,
xl: 1200px
);
Baseguide generates all the necessary grid and responsive visibility classes based on these breakpoints.
Media Queries are handled by Sass MQ.
// include the media query mixin and pass the breakpoint key
@include mq(md) {
}
The snippet above compiles to the following CSS:
@media (min-width: 42.5em) {
}
Check out the Sass MQ documentation for more details and advanced usage of media queries.
The loop-breakpoints
mixin iterates through all breakpoints. It sets three global variables and outputs the @content
for each breakpoint.
@include loop-breakpoints($breakpoints: $mq-breakpoints, $inclusive: true, $mq: true) {
@debug $breakpoint;
@debug $is-first-breakpoint;
@debug $is-last-breakpoint;
}
It’s a powerful tool that for example allows the generation of additional responsive helper classes.
@include loop-breakpoints {
.text-#{$breakpoint}-left {
text-align: left;
}
.text-#{$breakpoint}-center {
text-align: center;
}
.text-#{$breakpoint}-right {
text-align: right;
}
}
The grid system is responsive and follows the mobile first pattern. It offers predefined classes for quick layouts as well as powerful mixins for more semantic layouts.
The number of columns is controlled by the $grid-columns
variable which defaults to 12.
<div class="container">
<div class="row">
<div class="col col-md-6"></div>
<div class="col col-md-6"></div>
</div>
</div>
The gutters are controlled by the $grid-gutter
variable. It can either be a global value across all breakpoints or a map with gutter values per breakpoint.
// set gutter for all breakpoints
$grid-gutter: 60px;
// start with 20px gutter and increase to 40px from the md breakpoint
// note: breakpoints can be skipped to keep the last defined value
$grid-gutter: (
xs: 20px,
md: 40px
);
Accessing gutter values is easy using the get-gutter
function. The smallest gutter gets returned by default.
.col {
margin-bottom: get-gutter();
@include mq(md) {
margin-bottom: get-gutter(md);
}
}
The grid mixins can be used to create custom containers, rows and columns.
// $gutter: gutter width in pixels or map with gutters, defaults to $grid-gutter
// $size: column width as percentage value, decimal number or column count
// $columns: an integer, the total number of columns, defaults to $grid-columns
// $width: container width in pixels, defaults to $grid-container
@include container($gutter, $width);
@include row($gutter);
@include column-base($gutter, $size, $columns);
@include column($size, $columns);
@include column-push($size, $columns);
@include column-pull($size, $columns);
@include column-offset($size, $columns);
@include column-block($columns);
@include mq(sm) {
.col-content {
@include column(80%);
}
.col-sidebar {
@include column(40%);
}
}
<div class="container">
<div class="row">
<article class="col col-content">Main Content</article>
<aside class="col col-sidebar">Sidebar</aside>
</div>
</div>
.col-gallery {
@include column-base;
@include column-block(3);
@include mq(md) {
@include column-block(6);
}
}
<div class="container">
<div class="row">
<div class="col-gallery">Gallery item</div>
<div class="col-gallery">Gallery item</div>
<div class="col-gallery">Gallery item</div>
<div class="col-gallery">Gallery item</div>
<div class="col-gallery">Gallery item</div>
<div class="col-gallery">Gallery item</div>
</div>
</div>
There is a float fallback to make the grid work in browsers that don’t support flexbox. This fallback can be disabled by setting $grid-fallback: false
.
All form controls listed in $input-selector
get styled by default. The variable can be changed to a custom selector like .form-control
. This will allow you to selectively style form controls based on that selector.
The custom forms component was designed with progressive enhancement in mind. Browsers that support feature queries and appearance get the fully enhanced experience.
Baseguide uses Autoprefixer to handle CSS vendor prefixes.
The code is released under the MIT license.
FAQs
Lightweight and robust CSS framework for prototyping and production code.
The npm package baseguide receives a total of 242 weekly downloads. As such, baseguide popularity was classified as not popular.
We found that baseguide 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.