https://geoffyuen.github.io/hotplate-edge
Sass + CSS Grid + Gulp + Browser-sync + More
- Sass makes writing CSS easier and faster
- responsive 12-column CSS flexbox grid for layouts
- Gulp optimizes your images, javascripts and CSS
- Browser-sync reloads your browser when you save files
- IE10+
bower install https://github.com/geoffyuen/hotplate-edge.git && mv bower_components/hotplate-edge/* .
npm install
gulp
src
contains scss, js and img/* imagesstyle.scss
compliles to./style.css
sass/*
should contain all your sass filesjs/*
concats and minifies to./js/main.js
and./js/main.min.js
img/*
optimized to./img
sprites/*.svg
for svg icons compiles to/img/spritesheet.svg
./
should contain your html/php/twig filesjs
will contain your javascript. You should also put any vendor scripts in hereimg
will contain any optimized png, jpg and spritesheets
- Sass compilation
- Autoprefixer
- Sourcemapping
- Browsersync
- js concatenation + uglify
- png and jpg optimization
- svg spriting
Open the gulpfile.js. Edit the variables:
localurl = "yourlocalurl"
- eg. MAMP:localurl = "localhost:8888/yourprojectfolder"
iamrunningaserver = true
Open the gulpfile.js. Edit the variable:
iamrunningaserver = false
Running gulp
will start a webserver (using Browser-sync).
- inspired by Skeleton and Bootstrap, included with this boilerplate.
- rowless, meaning that you can insert countless columns inside a wrapper element. The columns will wrap to a "newline" if it's not able to fit on the current "row". This produces much less structural and unsemantic markup with typical float based grids like Bootstrap, Foundation, Bourbon, etc. Clearfixes are also not needed.
- you get equal height columns, can apply coloured backgrounds and custom padding to your columns.
Three columns:
<div class="wrapper">
<div class="col-4"></div>
<div class="col-4"></div>
<div class="col-4"></div>
</div>
Two rows of three columns:
<div class="wrapper">
<div class="col-4"></div>
<div class="col-4"></div>
<div class="col-4"></div>
<div class="col-4"></div>
<div class="col-4"></div>
<div class="col-4"></div>
</div>
Header, content area, sidebar and footer:
<div class="wrapper">
<header class="col-12"></header>
<section class="col-8"></section>
<aside class="col-4"></aside>
<footer class="col-12"></footer>
</div>
The use the classes below in your html to layout pages. Use the varibles in your Sass files to perform media queries using the media
or undermedia
mixins.
Width | Class | Sass Var |
---|---|---|
1140px | col-xl-* | $xl |
960px | col-lg-* | $lg |
768px | col-md-* or col-* | $md |
620px | col-sm-* | $sm |
480px | col-xs-* | $xs |
default | col-xxs-* | $xxs |
The * denotes number from 1-12. Combine the column classes on an element to change it's width depending on how wide the browser viewport is.
<div class="wrapper">
<div class="col-xxs-6 col-md-12 col-xl-4"></div>
</div>
The column above will display at half-width column on mobile, full width at tablet and then down to a third-width column widescreen monitor.
@include media() {
your rules go here;
}
This translates to:
@media (min-width: 768px) {
your rules are here;
}
If you want a specific breakpoint pass one of the breakpoint variables or your own (in ems, px, etc):
@include media($sm) {
your rules go here;
}
@include media(5em) {
your rules go here;
}
To write media queries below a breakpoint:
@include undermedia($lg) {
your rules go here;
}
This translates to:
@media (max-width: 959px) {
your rules are here;
}