css - 使用(或不使用)webpack 在 .elm 文件中导入 css/style 文件

标签 css styling elm

css/sass/stylus 文件可以通过某种方式直接导入到 Elm 文件中吗? webpack css-loader 模块通过 import './styles.css' 在 Javascript 中实现了这一点,但我找不到任何关于如何做到这一点的信息带或不带 Webpack 的 Elm。

最佳答案

当我开始研究样式时,我遇到了同样的问题,最后我通过使用 Elm 端口和订阅告诉 Webpack 获取 CSS 模块来制作一个 POC,了解它的外观。

查看:https://github.com/geekyme/elm-css-modules

关于css - 使用(或不使用)webpack 在 .elm 文件中导入 css/style 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36386204/

相关文章:

css - flexbox如何实现这种具体布局?

html - 将鼠标悬停在按钮上时更改字体颜色和背景图像

javascript - 如何让CSS高度100%可滚动?

WPF文本框边框被选中时?

javascript - Redux - 一个 vs 多个 reducer

f# - Elm 中的通用类型字典

html - 如何覆盖设置文件基础

html - 媒体查询 block 显示 :none issue

CSS 定位问题 - Tables vs. Absolute vs. DL

elm - 这个 `div` 调用产生 : Html (String -> Msg) But the type annotation on `view` says it should be: Html Msg