Skip to content

Commit

Permalink
Minify SVG images and add rules for High Contrast mode on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaefer committed Oct 31, 2019
1 parent cd4a26d commit 6ae2a64
Show file tree
Hide file tree
Showing 18 changed files with 331 additions and 127 deletions.
5 changes: 4 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"declaration-block-semicolon-newline-after": "always-multi-line",
"block-opening-brace-space-before": "always-multi-line",
"declaration-block-single-line-max-declarations": 3,
"selector-class-pattern": "mapboxgl-[a-z-]+"
"selector-class-pattern": "mapboxgl-[a-z-]+",
"at-rule-no-unknown": [true, {
"ignoreAtRules": ["svg-load"]
}]
}
}
1 change: 1 addition & 0 deletions debug/debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
}
}));
map.addControl(new mapboxgl.ScaleControl());
map.addControl(new mapboxgl.FullscreenControl());

map.on('load', function() {
map.addSource('geojson', {
Expand Down
12 changes: 11 additions & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
module.exports = {
plugins: [
require('postcss-inline-svg'),
require('cssnano')
require('cssnano')({
preset: ['default', {
svgo: {
plugins: [{
removeViewBox: false
}, {
removeDimensions: false
}],
},
}],
}),
]
}
Loading

0 comments on commit 6ae2a64

Please sign in to comment.