git.iko.soy/rowtype-yoga/purescript-fahrtwind
on main help sign in
6 files changed+21−8
since splitsnapshots
unifiedsplit
src/Fahrtwind.purs+1−1 src/Fahrtwind/Animation.purs+1−1 src/Fahrtwind/Style.purs+3−3 src/Fahrtwind/Style/Border.purs+10 src/Fahrtwind/Style/Color/Background.purs+4−1 src/Fahrtwind/Style/Text.purs+2−2
src/Fahrtwind.purs+1−1
@@ -8,4 +8,4 @@ module Fahrtwind
88import Fahrtwind.Animation (fadeInAndOutAnimationName, headShakeAnimationName, infiniteSpinAnimation, scaleAnimationName, spinAnimationName)
99import Fahrtwind.Layer (base, basePopper, level3, level3Popper, level4, level4Popper, level5, level5Popper, notification, notificationPopper, overlay, overlayPopper, topmost, zIndex)
1010import Fahrtwind.Style.PseudoElements (afterElement, beforeElement, content, firstLetter, firstLine, selection)
11−import Fahrtwind.Style (BlendMode(..), TailwindColor, acceptClicks, active, afterElement, alignSelfCenter, alignSelfEnd, alignSelfStart, amber, attributeValueStyle, background, background', backgroundBlendMode, backgroundImage, backgroundImage', backgroundNoRepeat, backgroundPosition, backgroundRepeat, backgroundRepeatX, backgroundRepeatY, backgroundSize, backgroundSize', beforeElement, black, blendModeToStyleProperty, block, blue, blueGray, blurredBackground, blurredBackground', border, borderBottom, borderCol, borderCol', borderLeft, borderNone, borderRight, borderSolid, borderTop, bottom, bottom', boxSizingBorderBox, boxSizingContentBox, checked, content, coolGray, cursorAuto, cursorDefault, cursorHelp, cursorMove, cursorNotAllowed, cursorPointer, cursorText, cursorWait, cyan, default, disabled, displayGrid, displayNone, divideCol, divideX, divideXReverse, divideY, divideYReverse, emerald, empty, enabled, evenChild, first, firstChild, firstLetter, firstLine, firstOfType, flex, flexCol, flexGrow, flexNoWrap, flexRow, flexShrink, flexWrap, flexWrapReverse, focus, focusWithin, fontBlack, fontBold, fontExtrabold, fontExtralight, fontFamilyOrMono, fontFamilyOrSans, fontFamilyOrSerif, fontLight, fontMedium, fontNormal, fontSemiMedium, fontSemibold, fontSize, fontSize', fontThin, fuchsia, full, fullscreen, gap, globalStyles, gray, green, height, height', heightFull, heightScreen, hover, hue, ignoreClicks, inRange, indeterminate, indigo, inlineBlock, inlineFlex, inlineGrid, invalid, invisible, isolate, isolationAuto, itemsAround, itemsBetween, itemsCenter, itemsEnd, itemsEvenly, itemsStart, justifyAround, justifyBetween, justifyCenter, justifyEnd, justifyEvenly, justifySelfCenter, justifySelfEnd, justifySelfStart, justifyStart, lastChild, lastOfType, left, left', lightBlue, lightness, lime, lineHeight, lineHeight', linearGradient, linearGradientStops, linearGradientStopsString, linearGradientString, link, m', mB, mB', mL, mL', mR, mR', mT, mT', mX, mX', mXAuto, mXY, mY, mY', maxHeight, maxHeight', maxWidth, maxWidth', minHeight, minHeight', minWidth, minWidth', mixBlendMode, mkRotate, mkShadow, mkTranslate, nest, nthChild, nthOfType, oddChild, onlyChild, onlyOfType, opacity, optional, orange, outOfRange, outlineNone, overflowHidden, overflowScroll, overflowVisible, overflowXHidden, overflowXScroll, overflowYHidden, overflowYScroll, p', pB, pB', pL, pL', pR, pR', pT, pT', pX, pX', pXY, pY, pY', pink, placeholder, pointerEventsAuto, pointerEventsNone, positionAbsolute, positionFixed, positionRelative, positionStatic, positionSticky, pseudoLeft, pseudoRight, purple, readOnly, readWrite, red, required, right, right', root, rose, rotate, rounded, rounded2xl, rounded3xl, roundedDefault, roundedFull, roundedLg, roundedMd, roundedNone, roundedSm, roundedXl, saturation, scope, screen2xl, screenHeight, screenLg, screenMd, screenSm, screenWidth, screenXl, selection, shadow, shadow', shadowDefault, shadowDefaultCol, shadowLg, shadowLgCol, shadowMd, shadowMdCol, shadowSm, shadowSmCol, shadowXl, shadowXlCol, shadowXxl, shadowXxlCol, shadows, svgBackgroundImage, target, teal, templateCols, templateRows, text2xl, text3xl, text4xl, text5xl, text6xl, text7xl, text8xl, text9xl, textBase, textCenter, textCol, textCol', textDefault, textJustify, textLeft, textLg, textOverflowEllipsis, textRight, textSized, textSm, textTransformUppercase, textXl, textXs, top, top', tracking, trackingNormal, trackingTight, trackingTighter, trackingWide, trackingWider, trackingWidest, transform, transform', transformMany, transition, transition', transitionRec, translate, trueGray, underline, userSelectNone, userSelectText, valid, variables, violet, visible, visited, warmGray, white, width, width', widthAndHeight, widthAndHeight', widthFull, widthScreen, withAlpha, withHue, withLightness, withSaturation, yellow)
11+import Fahrtwind.Style
src/Fahrtwind/Animation.purs+1−1
@@ -48,4 +48,4 @@ headShakeAnimationName =
4848 , "31.5%": E.css { transform: E.str " translateX(-3px) rotateY(-5deg)" }
4949 , "43.5%": E.css { transform: E.str " translateX(2px) rotateY(3deg)" }
5050 , "50%": E.css { transform: E.str "translateX(0)" }
51− }
51+ }
src/Fahrtwind/Style.purs+3−3
@@ -36,11 +36,11 @@ module Fahrtwind.Style
3636
3737import Fahrtwind.Style.BlendMode (backgroundBlendMode, mixBlendMode)
3838import Fahrtwind.Style.BlendMode.Types (BlendMode(..), blendModeToStyleProperty)
39−import Fahrtwind.Style.Border (border, borderBottom, borderCol, borderCol', borderLeft, borderNone, borderRight, borderSolid, borderTop, boxSizingBorderBox, boxSizingContentBox, rounded, rounded2xl, rounded3xl, roundedDefault, roundedFull, roundedLg, roundedMd, roundedNone, roundedSm, roundedXl)
39+import Fahrtwind.Style.Border (border, borderBottom, borderCol, borderCol', borderLeft, borderNone, borderRight, borderSolid, borderTop, boxSizingBorderBox, boxSizingContentBox, rounded, rounded2xl, rounded3xl, roundedDefault, roundedFull, roundedLg, roundedMd, roundedNone, roundedSm, roundedXl, borderGradient)
4040import Fahrtwind.Style.BoxModel (m', mB, mB', mL, mL', mR, mR', mT, mT', mX, mX', mXAuto, mXY, mY, mY', p', pB, pB', pL, pL', pR, pR', pT, pT', pX, pX', pXY, pY, pY')
4141import Fahrtwind.Style.BoxShadow (mkShadow, shadow, shadow', shadowDefault, shadowDefaultCol, shadowLg, shadowLgCol, shadowMd, shadowMdCol, shadowSm, shadowSmCol, shadowXl, shadowXlCol, shadowXxl, shadowXxlCol, shadows)
4242import Fahrtwind.Style.Breakpoint (screen2xl, screenLg, screenMd, screenSm, screenXl)
43−import Fahrtwind.Style.Color.Background (background, background', backgroundImage, backgroundImage', backgroundNoRepeat, backgroundPosition, backgroundRepeat, backgroundRepeatX, backgroundRepeatY, backgroundSize, backgroundSize', blurredBackground, blurredBackground', linearGradient, linearGradient', linearGradientStops, linearGradientStopsString, linearGradientString, svgBackgroundImage)
43+import Fahrtwind.Style.Color.Background (background, background', backgroundImage, backgroundImage', backgroundNoRepeat, backgroundPosition, backgroundRepeat, backgroundRepeatX, backgroundRepeatY, backgroundSize, backgroundSize', blurredBackground, blurredBackground', linearGradient, linearGradient', linearGradientStops, linearGradientStopsString, linearGradientString, linearGradientString', svgBackgroundImage)
4444import Fahrtwind.Style.Color.Tailwind (TailwindColor, amber, black, blue, blueGray, coolGray, cyan, emerald, fuchsia, gray, green, indigo, lightBlue, lime, orange, pink, purple, red, rose, teal, trueGray, violet, warmGray, white, yellow)
4545import Fahrtwind.Style.Color.Text (textCenter, textCol, textCol', textJustify, textLeft, textRight)
4646import Fahrtwind.Style.Color.Util (hue, lightness, saturation, withAlpha, withHue, withLightness, withSaturation)
@@ -48,7 +48,7 @@ import Fahrtwind.Style.Cursor (cursorAuto, cursorDefault, cursorHelp, cursorMove
4848import Fahrtwind.Style.Display (block, displayNone, flex, inlineBlock, inlineFlex, inlineGrid)
4949import Fahrtwind.Style.Display.Flex (alignSelfCenter, alignSelfEnd, alignSelfStart, flexCol, flexGrow, flexNoWrap, flexRow, flexShrink, flexWrap, flexWrapReverse, gap, itemsAround, itemsBetween, itemsCenter, itemsEnd, itemsEvenly, itemsStart, justifyAround, justifyBetween, justifyCenter, justifyEnd, justifyEvenly, justifySelfCenter, justifySelfEnd, justifySelfStart, justifyStart)
5050import Fahrtwind.Style.Display.Grid (displayGrid, templateCols, templateRows)
51−import Fahrtwind.Style.Divide (divideCol, divideX, divideXReverse, divideY, divideYReverse)
51+import Fahrtwind.Style.Divide (divideCol, divideCol', divideX, divideXReverse, divideY, divideYReverse)
5252import Fahrtwind.Style.Global (globalStyles, nest, variables)
5353import Fahrtwind.Style.Input (outlineNone, placeholder)
5454import Fahrtwind.Style.Inset (bottom, bottom', left, left', right, right', top, top')
src/Fahrtwind/Style/Border.purs+10
@@ -1,6 +1,7 @@
11module Fahrtwind.Style.Border where
22
33import Prelude
4+
45import Color (Color)
56import React.Basic.Emotion (Style, StyleProperty, borderBox, color, contentBox, css, px, rem, str)
67
@@ -66,3 +67,12 @@ boxSizingBorderBox = css { boxSizing: borderBox }
6667
6768boxSizingContentBox ∷ Style
6869boxSizingContentBox = css { boxSizing: contentBox }
70+
71+borderGradient :: { backgroundGradient :: String, borderGradient :: String } -> Style
72+borderGradient args =
73+ css
74+ { background: str $
75+ args.backgroundGradient <> " padding-box, "
76+ <> (args.borderGradient <> " border-box")
77+ , borderColor: str "transparent"
78+ }
src/Fahrtwind/Style/Color/Background.purs+4−1
@@ -63,7 +63,10 @@ backgroundSize ∷ String → Style
6363backgroundSize = backgroundSize' <<< str
6464
6565linearGradient' :: Int -> Array String -> Style
66−linearGradient' deg colours = css { background: str bg }
66+linearGradient' deg colours = css { background: str (linearGradientString' deg colours) }
67+
68+linearGradientString' :: Int -> Array String -> String
69+linearGradientString' deg colours = bg
6770 where
6871 bg = "linear-gradient(" <> show deg <> "deg, "
6972 <> intercalate "," (colours)
src/Fahrtwind/Style/Text.purs+2−2
@@ -134,9 +134,9 @@ italic = css { fontStyle: str "italic" }
134134textLinearGradient :: Int -> Array String -> Style
135135textLinearGradient deg colours =
136136 css
137− { backgroundClip: str "text"
137+ { background: str bg
138+ , backgroundClip: str "text"
138139 , textFillColor: str "transparent"
139− , background: str bg
140140 }
141141 where
142142 bg = "linear-gradient(" <> show deg <> "deg, "