css-import

react-slick: Import CSS from slick-carousel fails

≯℡__Kan透↙ 提交于 2020-05-10 18:42:37
问题 React beginner here. My app uses create-react-app, and I'm pulling in react-slick for a carousel. I'm trying to follow the directions that are provided in the setup for react-slick, but the following doesn't work for me: @import "~slick-carousel/slick/slick.css"; @import "~slick-carousel/slick/slick-theme.css"; I get the following error: ./src/components/Homepage.scss Module not found: Can't resolve '~slick-carousel/slick/slick.css' in '/Users/simon/Dev/frischideas/site-new/src/components' It

How to use Material Design Icons in a web component?

♀尐吖头ヾ 提交于 2020-05-09 07:01:07
问题 Looks like that mdi is not working inside web components, or do I miss something? I want to develop a web component that encapsulates it's dependencies, adding the link to the parent document works, but it violates the original intent. <html> <body> <x-webcomponent></x-webcomponent> <script> customElements.define( "x-webcomponent", class extends HTMLElement { constructor() { super(); this.attachShadow({ mode: "open" }); this.shadowRoot.innerHTML = ` <style>@import url('https://cdn