Remove duped vendor prefix heleprs

This commit is contained in:
Tessa Kelly 2020-11-06 10:51:33 -08:00
parent 9b4e46145d
commit e536c34e40
3 changed files with 2 additions and 51 deletions

View File

@ -1,49 +0,0 @@
module Nri.Ui.Css.VendorPrefixed exposing (property, value, complexProperty)
{-| Vendor prefixed css properties.
@docs property, value, complexProperty
-}
import Css
{-| Css vendor prefixes
-}
prefixes : List String
prefixes =
[ "-webkit-", "-moz-", "-o-", "-ms-", "" ]
{-| Same as Css.property but vendor prefixed.
-}
property : String -> String -> Css.Style
property prop value_ =
prefixes
|> List.map
(\prefix ->
Css.property (prefix ++ prop) value_
)
|> Css.batch
{-| Same as Css.property but vendor prefixed.
-}
value : String -> String -> Css.Style
value prop value_ =
prefixes
|> List.map
(\prefix ->
Css.property prop (prefix ++ value_)
)
|> Css.batch
{-| Used to build more complex Css styles
-}
complexProperty : (String -> Css.Style) -> Css.Style
complexProperty buildProp =
prefixes
|> List.map buildProp
|> Css.batch

View File

@ -16,7 +16,7 @@ import Json.Decode exposing (Decoder)
import Nri.Ui
import Nri.Ui.Colors.Extra as ColorsExtra
import Nri.Ui.Colors.V1 as Colors
import Nri.Ui.Css.VendorPrefixed as VendorPrefixed
import Nri.Ui.CssVendorPrefix.V1 as VendorPrefixed
import Nri.Ui.Fonts.V1 as Fonts
import Nri.Ui.Util

View File

@ -15,7 +15,7 @@ import Html.Attributes
import Html.Styled.Attributes as Attributes exposing (..)
import Html.Styled.Events as Events
import Nri.Ui.Colors.V1 as Colors
import Nri.Ui.Css.VendorPrefixed as VendorPrefixed
import Nri.Ui.CssVendorPrefix.V1 as VendorPrefixed
import Nri.Ui.Fonts.V1 as Fonts
import Nri.Ui.Heading.V2 as Heading
import Routes as Routes exposing (Route(..))