Dotclear

source: themes/berlin/scss/init/_mixins-functions.scss @ 2949:4e44ab2ef195

Revision 2949:4e44ab2ef195, 676 bytes checked in by franck <carnet.franck.paul@…>, 11 years ago (diff)

Use base64 inline url for png/svg images <= 2Kb (recommendation from  http://yellowlab.tools/ tools)

Line 
1// mixin svg fallback
2@mixin svg(
3    $file-name,
4    $css-img-path: $css-img-path) {
5    background-image: inline-image($file-name+'.png');
6    background-image: inline-image($file-name+'.svg'), none;
7}
8
9@mixin bg-with-svg(
10    $file-name,
11    $css-img-path: $css-img-path,
12    $repeat: no-repeat,
13    $position: 50% 50%,
14    $bg-color: transparent) {
15    background: inline-image($file-name+'.png') $repeat, $position, $bg-color;
16    background-image: inline-image($file-name+'.svg'), none;
17}
18
19@mixin visually-hidden {
20    border: 0;
21    clip: rect(0 0 0 0);
22    height: 1px;
23    margin: -1px;
24    overflow: hidden;
25    padding: 0;
26    position: absolute;
27    width: 1px;
28}
Note: See TracBrowser for help on using the repository browser.

Sites map