Elm Html.Attributes 模块不暴露 css
Elm The Html.Attributes module does not expose css
出于某种原因,Elm 找不到 css
import Html.Attributes exposing (class, css)
elm.json:
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"elm/browser": "1.0.2",
"elm/core": "1.0.5",
"elm/html": "1.0.0",
"matheus23/elm-default-tailwind-modules": "2.0.3",
"rtfeldman/elm-css": "17.0.5"
},
"indirect": {
"elm/json": "1.1.3",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.2",
"robinheghan/murmur3": "1.0.0",
"rtfeldman/elm-hex": "1.0.0"
}
},
"test-dependencies": {
"direct": {},
"indirect": {}
}
}
css
不是核心 Elm Html.Attribute
模块的一部分,它是 elm-css 的一部分(我看到你已经包含在你的 elm.json 中),其中引入了 Html.Styled
、Html.Styled.Attributes
、Html.Styled.Events
模块,这些模块基本上 drop-in 替代了它们的非 Styled
对应模块,但具有 css
支持。
所以只需更改:
import Html.Attributes exposing (class, css)
收件人:
import Html.Styled.Attributes exposing (class, css)
你应该很好。
有关详细信息,请参阅他们的文档 - https://package.elm-lang.org/packages/rtfeldman/elm-css/17.0.5/
出于某种原因,Elm 找不到 css
import Html.Attributes exposing (class, css)
elm.json:
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"elm/browser": "1.0.2",
"elm/core": "1.0.5",
"elm/html": "1.0.0",
"matheus23/elm-default-tailwind-modules": "2.0.3",
"rtfeldman/elm-css": "17.0.5"
},
"indirect": {
"elm/json": "1.1.3",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.2",
"robinheghan/murmur3": "1.0.0",
"rtfeldman/elm-hex": "1.0.0"
}
},
"test-dependencies": {
"direct": {},
"indirect": {}
}
}
css
不是核心 Elm Html.Attribute
模块的一部分,它是 elm-css 的一部分(我看到你已经包含在你的 elm.json 中),其中引入了 Html.Styled
、Html.Styled.Attributes
、Html.Styled.Events
模块,这些模块基本上 drop-in 替代了它们的非 Styled
对应模块,但具有 css
支持。
所以只需更改:
import Html.Attributes exposing (class, css)
收件人:
import Html.Styled.Attributes exposing (class, css)
你应该很好。
有关详细信息,请参阅他们的文档 - https://package.elm-lang.org/packages/rtfeldman/elm-css/17.0.5/