source: frontend/node_modules/postcss-import/lib/assign-layer-names.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 466 bytes
Line 
1"use strict"
2
3module.exports = function (layer, node, state, options) {
4 layer.forEach((layerPart, i) => {
5 if (layerPart.trim() === "") {
6 if (options.nameLayer) {
7 layer[i] = options
8 .nameLayer(state.anonymousLayerCounter++, state.rootFilename)
9 .toString()
10 } else {
11 throw node.error(
12 `When using anonymous layers in @import you must also set the "nameLayer" plugin option`
13 )
14 }
15 }
16 })
17}
Note: See TracBrowser for help on using the repository browser.