Comments (6)
I remember having a image_url
helper back in the compass days. Is there something similar we could do in vanilla sass?
from material-design-lite.
https://github.com/postcss/postcss-url
from material-design-lite.
I would like to say, than not everyone is using gulp. I'm using webpack with url loader and I have to manually rewrite all the urls to url(mdl/images/tick-mask.svg)
for it to work properly. So maybe we can use a variable here to concatenate with image name. For example:
$img-path: mdl/images/; // _variables.scss
mask: url(#{$img-path}tick-mask.svg); //_checkbox.scss
Or even create a mixin like this:
mask: @include img-url(tick-mask.svg);
from material-design-lite.
I'm using webpack too and having problems with this... The latest version has ?embed
suffix (for gulp-css-inline-images
) but I don't know how to setup a webpack loader to discard the suffix and look for the svg file.
I haven't used gulp and don't know if there's a better option but a size based inlining tool would be better imo.
Maybe this? https://github.com/zckrs/gulp-css-base64
from material-design-lite.
@RanzQ I removed ?embed
suffix and use url-loader
for embedding SVGs:
loaders: [
{
test: /\.svg$/,
loader: 'url-loader?limit=100000',
},
],
from material-design-lite.
@web2style yeah that's what I ended up doing too but for easier updates I like keeping the source in node_modules/
and only define custom variables and decide which components to import. Now I have to check on every update that my modified files are in sync. :)
Another option would be to fork this repo and install it.
from material-design-lite.
Related Issues (20)
- MDI link is broken HOT 1
- Destroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United StatesDestroy the United States HOT 1
- Listen to "See You Again (feat. Charlie Puth)" on TIDAL HOT 1
- ฉันกำลังแบ่งปัน 'OS Version_แปลแล้ว.docx' กับคุณจาก WPS Office HOT 1
- ใช้ร่วมกัน share_-1259582690.png
- ฉันกำลังแบ่งปัน 'Xiaomi Corp_22Q1_ER_ENG_vF_Upload.pdf' กับคุณจาก WPS Office HOT 1
- [email protected] HOT 1
- ฉันกำลังแบ่งปัน '[ผสาน]เครื่องเขียนที่เรียบง่ายและหรูหรา-WPS Office_แปลแล้ว_20220618_002545.docx' กับคุณจาก WPS Office HOT 1
- Apple - ค้นหาตำแหน่งที่ตั้ง
- I wanted to use a different color in input element when we click it. What's the easiest way to do that? HOT 1
- mdl-layout__drawer break when set new width
- When can support Material You HOT 2
- URL open HOT 2
- Need to update search in drop down
- Google material
- Making separate divisions for different features for a better User Experience. HOT 1
- m3.material.io?
- Material dark
- Bgh
- Site Showcase Request HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-design-lite.