Get started immidiately with the default CSS, by including it in the header:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/shut@6/dist/css/sh.min.css" />
And here is the simplest starting template:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/shut@6/dist/css/sh.min.css">
<title>Shut template</title>
</head>
<body>
<div class="page">
<div class="container">
Responsive content
</div>
</div>
</body>
</html>
In order to create your own css, based on the basic rules of SHUT, you need to have at least LESS installed, or a LESS task running plugin. I use Gulp, and Gulp-less.
See the list of variables, and the list of functions inside Shut framework.
Begin with sh.imports.less
. Import all styles in one shot:
// import all from shut
@import "sh.less";
Or be specific and include only the styles you need. Here are all individual imports used to create sh.less
// ***********CUSTOM**************
// shut vars
@import "sh.vars.less";
/* resetting */
@import "css.Reset";
// include if used
@import "utilities/arrow";
@import "utilities/border";
@import "utilities/gradient";
@import "utilities/functions";
@import "utilities/media";
@import "utilities/scroll";
// icon functions
@import "css.Icon";
// all other styles
@import "css.General";
@import "css.Layout";
@import "css.Card";
@import "css.Lists";
@import "css.Table";
// uses utitilites/media
@import "css.Grid";
// uses utitilites/border and utilities/functions
@import "css.Button";
@import "css.Box";
@import "css.Label";
// uses utitilites/scroll
@import "css.Modal";
// uses utitilites/media and utilities/functions
@import "css.Type";
/* Print */
@import "media.print.less";
// overriders all the way at the bottom, after all the other styles
@import "css.Override.less";
Add the following, begin with overriding with your variables file, then Gulp task indicators. The task hints to inject and create css files in development environment If you do not wish to use the gulp tasks included in Shut Framework, you can remove them.
// you vars, overwrites shut vars
@import "sh._vars.less";
/************GULP RELATED*************/
// inject:uiless
// endinject
// inject:medialess
// endinject
// overriders kept at last
@import "css.Override.less";
Add a file sh._vars.less
(or anything). Add the variables you want to
overrdie
from the list of variables in Shut. Import the file into your sh.imports.less
created above.
@color
, @shadows
, @font-weight-set
Removing elements,
removes output rules.Shut framework is basic, it does not have icons out of the box (nor will it ever). But it, however, includes
basic functions to make dealing with custom icons easy. If you have a font icon to use, first, set the @enable-icon-font
to true, to include icon related rules.
sekrab-gulpbin
gulp tasks.@icon-font
variable.
iconfontspath
: './fontfiles/'
// inject:icons
// endinject
gulp createicons
gulp rawless
to build the main css file
Now the icons are ready. You can see the generated icons in ui.icons.less
In order to make use of the gulp tasks included, the files of different styles, should be prefixed with
ui.. Like for example, ui.header.less
.
// ui.header.less:
header {
position: fixed;
background-color: @white;
top: 0;
width: 100%;
z-index: 1000;
}
Now you are ready to use gulp in development, to generate the output css file, the RTL version (if required), and the minified versios of them.
Gulp tasks for assets are document in sekrab-gulpbin