git.iko.soy/typeable/elm-ui
on master help sign in
remove disabling of a variant because I don't think it's actually needed.
commit3ba2e668feb3a100c74d87e873ad9cb9ec0fe15b authorMatthew Griffith <mdg.griffith@gmail.com> dateSat 22 Sep 2018, 18:47 (8 years ago) parentb975f51
1 file changed+5−25
src/Element/Font.elm+5−25
src/Element/Font.elm+5−25
@@ -5,7 +5,7 @@ module Element.Font exposing
55 , alignLeft, alignRight, center, justify, letterSpacing, wordSpacing
66 , underline, strike, italic, unitalicized
77 , heavy, extraBold, bold, semiBold, medium, regular, light, extraLight, hairline
8− , Variant, variant, smallCaps, slashedZero, ligatures, ordinal, tabularNumbers, stackedFractions, diagonalFractions, swash, disable, feature, indexed
8+ , Variant, variant, smallCaps, slashedZero, ligatures, ordinal, tabularNumbers, stackedFractions, diagonalFractions, swash, feature, indexed
99 , glow, shadow
1010 )
1111
@@ -73,7 +73,7 @@ module Element.Font exposing
7373
7474## Variants
7575
76−@docs Variant, variant, smallCaps, slashedZero, ligatures, ordinal, tabularNumbers, stackedFractions, diagonalFractions, swash, disable, feature, indexed
76+@docs Variant, variant, smallCaps, slashedZero, ligatures, ordinal, tabularNumbers, stackedFractions, diagonalFractions, swash, feature, indexed
7777
7878
7979## Shadows
@@ -346,6 +346,7 @@ glow clr i =
346346{- Variants -}
347347
348348
349+{-| -}
349350type alias Variant =
350351 Internal.Variant
351352
@@ -359,6 +360,8 @@ type alias Variant =
359360
360361**Note** These will **not** stack. If you want multiple variants, you should use `Font.with`.
361362
363+If you specify a font variant on an element, then it will override all variants listed in `Font.with`.
364+
362365-}
363366variant : Variant -> Attribute msg
364367variant var =
@@ -376,29 +379,6 @@ variant var =
376379 ("\"" ++ name ++ "\" " ++ String.fromInt index)
377380
378381
379−{-| Less often you might want to disable an active variant.
380−
381− el
382− [ Font.variant (Font.disable Font.smallCaps)
383− ]
384− (text "Is not smallcaps")
385−
386−**Note** Generally try to set yourself up so that this isn't really necessary.
387−
388−-}
389−disable : Variant -> Variant
390−disable var =
391− case var of
392− Internal.VariantActive name ->
393− Internal.VariantOff name
394−
395− Internal.VariantIndexed name index ->
396− Internal.VariantOff name
397−
398− Internal.VariantOff name ->
399− var
400−
401−
402382{-| [Small caps](https://en.wikipedia.org/wiki/Small_caps) are rendered using uppercase glyphs, but at the size of lowercase glyphs.
403383-}
404384smallCaps : Variant