Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
postcss-elm-tailwind
Advanced tools
view : Model -> Html Msg
view model =
Html.div [ TW.h_screen, TW.w_screen, TW.flex, TW.justify_center, TW.items_center, TW.bg_gray_200 ]
[ Html.div []
[ Html.button
[ E.onClick Decrement
, TW.px_2
, TW.px_4
, TW.text_white
, TW.bg_blue_500
, TW.w_full
]
[ Html.text "-" ]
, Html.div
[ TW.text_2xl
, TW.text_center
, TW.my_4
]
[ Html.text (String.fromInt model) ]
, Html.button
[ E.onClick Increment
, TW.px_2
, TW.px_4
, TW.text_white
, TW.bg_blue_500
, TW.w_full
]
[ Html.text "+" ]
]
]
yarn add postcss-elm-tailwind --dev
# OR
npm i -D postcss-elm-tailwind
module.exports = {
plugins: [
require("tailwindcss"),
require("postcss-elm-tailwind")()
]
};
module.exports = {
plugins: [
require("tailwindcss"),
require("postcss-elm-tailwind")({
prefix: "tw-", // you must tell us if you have set a prefix in your tailwind.config.js
elmFile: "src/Tailwind.elm", // change where the generated Elm module is saved
elmModule: "Tailwind" // this must match the file name or Elm will complain
})
]
};
See the demo for a full example.
In order to get a small build, you'll need to build Tailwind twice - once
without purgecss to build TW.elm
with all the classes and once with purgecss
so that all the unused classes are removed from your production CSS.
See how this is implemented in the demo.
FAQs
PostCSS plugin Tailwind classes for Elm
The npm package postcss-elm-tailwind receives a total of 9 weekly downloads. As such, postcss-elm-tailwind popularity was classified as not popular.
We found that postcss-elm-tailwind demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.