clay 0.16.0 → 0.16.1
raw patch · 5 files changed
+80/−28 lines, 5 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
+ Clay: data Overscroll
+ Clay: overscrollBehavior :: Overscroll -> Css
+ Clay: overscrollBehavior2 :: Overscroll -> Overscroll -> Css
+ Clay: overscrollBehaviorBlock :: Overscroll -> Css
+ Clay: overscrollBehaviorInline :: Overscroll -> Css
+ Clay: overscrollBehaviorX :: Overscroll -> Css
+ Clay: overscrollBehaviorY :: Overscroll -> Css
+ Clay.Background: instance Clay.Common.Contain Clay.Background.BackgroundSize
+ Clay.Common: class Contain a
+ Clay.Common: class Revert a
+ Clay.Common: class RevertLayer a
+ Clay.Common: contain :: Contain a => a
+ Clay.Common: containValue :: Value
+ Clay.Common: instance Clay.Common.Contain Clay.Property.Value
+ Clay.Common: instance Clay.Common.Revert Clay.Property.Value
+ Clay.Common: instance Clay.Common.RevertLayer Clay.Property.Value
+ Clay.Common: revert :: Revert a => a
+ Clay.Common: revertLayer :: RevertLayer a => a
+ Clay.Common: revertLayerValue :: Value
+ Clay.Common: revertValue :: Value
+ Clay.Display: data Overscroll
+ Clay.Display: instance Clay.Common.Auto Clay.Display.Overscroll
+ Clay.Display: instance Clay.Common.Contain Clay.Display.Overscroll
+ Clay.Display: instance Clay.Common.Inherit Clay.Display.Overscroll
+ Clay.Display: instance Clay.Common.Initial Clay.Display.Overscroll
+ Clay.Display: instance Clay.Common.None Clay.Display.Overscroll
+ Clay.Display: instance Clay.Common.Other Clay.Display.Overscroll
+ Clay.Display: instance Clay.Common.Revert Clay.Display.Overscroll
+ Clay.Display: instance Clay.Common.RevertLayer Clay.Display.Overscroll
+ Clay.Display: instance Clay.Common.Unset Clay.Display.Overscroll
+ Clay.Display: instance Clay.Property.Val Clay.Display.Overscroll
+ Clay.Display: overscrollBehavior :: Overscroll -> Css
+ Clay.Display: overscrollBehavior2 :: Overscroll -> Overscroll -> Css
+ Clay.Display: overscrollBehaviorBlock :: Overscroll -> Css
+ Clay.Display: overscrollBehaviorInline :: Overscroll -> Css
+ Clay.Display: overscrollBehaviorX :: Overscroll -> Css
+ Clay.Display: overscrollBehaviorY :: Overscroll -> Css
- Clay.Background: contain :: BackgroundSize
+ Clay.Background: contain :: Contain a => a
Files
- CHANGELOG +4/−0
- clay.cabal +6/−2
- src/Clay/Background.hs +2/−3
- src/Clay/Common.hs +35/−23
- src/Clay/Display.hs +33/−0
CHANGELOG view
@@ -1,5 +1,9 @@ CHANGELOG + 0.16.1:+ - Add support for overscroll-behaviour+ Thanks to Sylvain Henry+ 0.16.0: - Add grid size and location support. - Derive `Stretch` for justified content
clay.cabal view
@@ -1,5 +1,5 @@ Name: clay-Version: 0.16.0+Version: 0.16.1 Synopsis: CSS preprocessor as embedded Haskell. Description: Clay is a CSS preprocessor like LESS and Sass, but implemented as an embedded@@ -33,7 +33,11 @@ GHC==8.10.7, GHC==9.0.2, GHC==9.2.2,- GHC==9.4.2+ GHC==9.4.2,+ GHC==9.6.6,+ GHC==9.8.1,+ GHC==9.10.1,+ GHC==9.12.1 Source-Repository head Type: git
src/Clay/Background.hs view
@@ -145,13 +145,12 @@ ------------------------------------------------------------------------------- newtype BackgroundSize = BackgroundSize Value- deriving (Val, Other, Inherit)+ deriving (Val, Other, Inherit, Contain) instance Auto BackgroundSize where auto = auto `by` auto -contain, cover :: BackgroundSize+cover :: BackgroundSize -contain = BackgroundSize "contain" cover = BackgroundSize "cover" by :: Size a -> Size b -> BackgroundSize
src/Clay/Common.hs view
@@ -15,17 +15,20 @@ ------------------------------------------------------------------------------- -class All a where all :: a-class Auto a where auto :: a-class Baseline a where baseline :: a-class Center a where center :: a-class Inherit a where inherit :: a-class None a where none :: a-class Normal a where normal :: a-class Visible a where visible :: a-class Hidden a where hidden :: a-class Initial a where initial :: a-class Unset a where unset :: a+class All a where all :: a+class Auto a where auto :: a+class Baseline a where baseline :: a+class Center a where center :: a+class Inherit a where inherit :: a+class None a where none :: a+class Normal a where normal :: a+class Visible a where visible :: a+class Hidden a where hidden :: a+class Initial a where initial :: a+class Unset a where unset :: a+class Contain a where contain :: a+class Revert a where revert :: a+class RevertLayer a where revertLayer :: a -- | The other type class is used to escape from the type safety introduced by -- embedding CSS properties into the typed world of Clay. `Other` allows you to@@ -55,19 +58,28 @@ initialValue = "initial" unsetValue :: Value unsetValue = "unset"+containValue :: Value+containValue = "contain"+revertValue :: Value+revertValue = "revert"+revertLayerValue :: Value+revertLayerValue = "revert-layer" -instance All Value where all = allValue-instance Auto Value where auto = autoValue-instance Baseline Value where baseline = baselineValue-instance Center Value where center = centerValue-instance Inherit Value where inherit = inheritValue-instance Normal Value where normal = normalValue-instance None Value where none = noneValue-instance Visible Value where visible = visibleValue-instance Hidden Value where hidden = hiddenValue-instance Other Value where other = id-instance Initial Value where initial = initialValue-instance Unset Value where unset = unsetValue+instance All Value where all = allValue+instance Auto Value where auto = autoValue+instance Baseline Value where baseline = baselineValue+instance Center Value where center = centerValue+instance Inherit Value where inherit = inheritValue+instance Normal Value where normal = normalValue+instance None Value where none = noneValue+instance Visible Value where visible = visibleValue+instance Hidden Value where hidden = hiddenValue+instance Other Value where other = id+instance Initial Value where initial = initialValue+instance Unset Value where unset = unsetValue+instance Contain Value where contain = containValue+instance Revert Value where revert = revertValue+instance RevertLayer Value where revertLayer = revertLayerValue -------------------------------------------------------------------------------
src/Clay/Display.hs view
@@ -34,6 +34,15 @@ , scroll , overflow, overflowX, overflowY +-- * Overscroll+, Overscroll+, overscrollBehavior+, overscrollBehavior2+, overscrollBehaviorX+, overscrollBehaviorY+, overscrollBehaviorBlock+, overscrollBehaviorInline+ -- * Visibility. , Visibility@@ -182,6 +191,30 @@ overflow = key "overflow" overflowX = key "overflow-x" overflowY = key "overflow-y"++-------------------------------------------------------------------------------++newtype Overscroll = Overscroll Value+ deriving (Val, Other, None, Auto, Contain, Inherit, Initial, Unset, Revert, RevertLayer)++-- | Specify both X and Y overscroll at once+overscrollBehavior :: Overscroll -> Css+overscrollBehavior = key "overscroll-behavior"++overscrollBehavior2 :: Overscroll -> Overscroll -> Css+overscrollBehavior2 x y = key "overscroll-behavior" (x ! y)++overscrollBehaviorX :: Overscroll -> Css+overscrollBehaviorX = key "overscroll-behavior-x"++overscrollBehaviorY :: Overscroll -> Css+overscrollBehaviorY = key "overscroll-behavior-y"++overscrollBehaviorBlock :: Overscroll -> Css+overscrollBehaviorBlock = key "overscroll-behavior-block"++overscrollBehaviorInline :: Overscroll -> Css+overscrollBehaviorInline = key "overscroll-behavior-inline" -------------------------------------------------------------------------------