1.1.1 (commit log)
- Add
::backdrop,::marker,::placeholderpseudo-elements (backdrop,marker,placeholder) - Add
:any-link,:focus-visible,:focus-within,:placeholder-shown,:rootpseudo-classes - Add
:has(...),:is(...),:where(...)pseudo-classes, and multi-arg:not(...) - Add
.importantsupport toToAVattributes (backgroundClip,borderRadius,quotes,textDecorationLine) - Add
[attr|="..."](attrDashMatch),[attr*="..."](attrSubstring) attribute selectors and case-sensitivity flags (AttrCase.Insensitive/i,AttrCase.Sensitive/s) - Add
animationFillMode.none - Add
animationName.none - Add
any-hovermedia feature (media.anyHover,media.anyHoverNone,media.anyHoverHover) - Add
any-pointermedia feature (media.anyPointer,media.anyPointerNone,media.anyPointerCoarse,media.anyPointerFine) - Add
backgroundClip.textwithCanIUse.backgroundClipTextprefixing - Add
FontFacefont-display, multi-rangeunicode-range, and variable-font range descriptors (fontWeight,fontStretch,fontStyle.oblique) - Add
fontFace,keyframe{,s}toStyleSheet.Standalone - Add
fontFamilygeneric font families and fallback stack overloads - Add
forced-colorsmedia feature (media.forcedColors,media.forcedColorsNone,media.forcedColorsActive) - Add
gridTemplateAreas.none - Add
hovermedia feature (media.hover,media.hoverNone,media.hoverHover) - Add
jumpStart,jumpEnd,jumpNone,jumpBothstep timing-function jump terms - Add media query range syntax (eg.
media.width >= 500.px,media.width.between(400.px, 800.px)) - Add
overflow.clip - Add
overflowX.clip - Add
overflowY.clip - Add
placeSelfsingle-keyword values and two-value chaining (eg.placeSelf.center.start) - Add
pointermedia feature (media.pointer,media.pointerNone,media.pointerCoarse,media.pointerFine) - Add
prefers-color-schememedia feature (media.prefersColorSchemeLight,media.prefersColorSchemeDark) - Add
prefers-contrastmedia feature (media.prefersContrast,media.prefersContrastNoPreference,media.prefersContrastMore,media.prefersContrastLess,media.prefersContrastCustom) - Add
prefers-reduced-motionmedia feature (media.prefersReducedMotion,media.prefersReducedMotionNoPreference,media.prefersReducedMotionReduce) - Add
revertandrevertLayerCSS keywords to all typed attributes - Add
textAlign.justifyAll - Add
textIndent(len, eachLine, hanging)overload - Add new CSS properties:
accentColorappearanceaspectRatiobackdropFiltercolorSchemecontaincontainercontainerNamecontainerTypeinsetinsetBlockinsetBlockEndinsetBlockStartinsetInlineinsetInlineEndinsetInlineStartmarginBlockmarginInlinemaskClipmaskCompositemaskImagemaskModemaskOriginmaskPositionmaskRepeatmaskSizepaddingBlockpaddingInlineplaceContentplaceItemsprintColorAdjustrotatescaletextWraptranslate
- Add typed DSLs for
flexBasis,overflowWrap,svgFill,svgFloodColor,textStrokeColor, andtextStrokeWidth - Add viewport units (
vi,vb,sv*,lv*,dv*), container query units (cqw,cqh,cqi,cqb,cqmin,cqmax),fr, and angle units (deg,grad,rad,turn) - Add
whiteSpace.breakSpaces - Deprecate
boxSizing.paddingBox(removed from CSS Box Sizing specification) - Deprecate
Env.Media— it is unused - Deprecate
gridAutoPosition(removed from CSS Grid specification) - Deprecate
offsetBlockStart,offsetBlockEnd,offsetInlineStart,offsetInlineEndin favour ofinsetBlock*/insetInline* - Deprecate
PlatformJs— replacejs.evalof embeddedplatform.jswith direct user-agent detection inPlatformJsEnv. This is now the defaultEnvdetection method on JS. - Deprecate
textAlign.startEnd(removed from CSS Text specification) - Fix
-webkit-prefixes not being emitted due to agent collision - Fix
:nth-childsupport for whitespace, case-insensitivity, andof <selector> - Fix
alignContent.spaceEvenlymissingCanIUse.justifyContentSpaceEvenlytransform - Fix
backgroundBlendModemissingCanIUse.backgroundblendmodetransform - Fix
backgroundImage/backgrounddropping combined prefixes when mixing gradient andimage-setfunctions - Fix
backgroundOriginandbackgroundSizemissingCanIUse.backgroundImgOptstransform - Fix
backgroundRepeatmissingCanIUse.backgroundRepeatRoundSpacetransform - Fix
CanIUse2.PrefixApply.keywordscrashing/corrupting on$/\and rewriting keywords insideurl(...)or quoted strings - Fix
columnCountaccepting floats instead of only integers - Fix
Composedropping overriding values when they appear inside an existing fallback value list - Fix
Composewarning order being non-deterministic when composing styles with >4 conditions - Fix
Cond.applyToStylenon-deterministic property ordering when styles have >4 conditions - Fix
cursor.grabandcursor.grabbingprefixing to useCanIUse.css3CursorsGrab - Fix
Doubleformatting inconsistencies between JVM and Scala.js - Fix
fontVariantNumericmissingCanIUse.fontVariantNumerictransform - Fix
imageOrientationmissingCanIUse.imageOrientationtransform - Fix
justifyContent.spaceEvenlymissingCanIUse.justifyContentSpaceEvenlytransform - Fix
keyframe(className)ignoring the specifiedclassName - Fix
keyframescrashing when itsvalname contains whitespace (eg. backticked identifiers) - Fix
keyframesflattening pseudo-selectors, media queries, andunsafe*rules unconditionally into@keyframesstops instead of ignoring them with a warning - Fix
MacroName.Use,Register.registerF2, andNameGen.numberedpotentially generating invalid CSS class identifiers - Fix
Media.Query.andsilently dropping incompatible media types, mis-negatingNot(...)conjunctions, and reordering features - Fix
NameGen.shortprefix validation andNameGen.Alphabetguards for empty/negative inputs - Fix
outlineStyleallowing invalidhiddenkeyword - Fix
overflowmissingCanIUse.overflowtransform - Fix
overflowXandoverflowYmissingCanIUse.overflowtransform - Fix
position.stickymissingCanIUse.stickytransform - Fix
Pseudo.AttrSelectorCSS escaping - Fix
Pseudo.modSelectorattaching pseudo-classes/elements only to the last selector in comma-separated selector lists - Fix
Register.applyMacroNameoverwriting explicit class names and ignoring empty styles - Fix
Register.csspotentially reading a torn snapshot across separate locks - Fix
Register.registerF2overwriting explicit class names, overridingaddClassNames-only branches, and skipping uniqueness checks - Fix
Register.registerFontFacecrashing on multi-wordfontFamilynames - Fix
Register.registerSfailing to reserve class names for empty styles - Fix
Registerauto-generated class names colliding with existing manual names - Fix
Registerexposing it's now-private mutable state - Fix
rowGapmissingCanIUse.flexboxGaptransform - Fix
ScalatagsTextRendererfailing to escape</styleinside<style>tags - Fix
StyleA.+duplicating class names - Fix
styleFandStyleSheetclass name generation (sanitising suffixes, empty manual names,addClassNames-only branches, and class name hints) - Fix
StyleSheetRegistry(GlobalRegistry) callback ordering/re-entrancy, deduplication, and addregisterListener,unregister,clear, andclearListeners - Fix a thread-safety bug in internal memoisation
- Fix a thread-safety race between macro-naming and style registration
- Fix colour literals (
c"...") to accept case-insensitivenone/deg - Fix default prod settings so that naming conflicts don't occur with more than 52 stylesheets
- Fix extra prefixes being emitted when a specific agent is detected/specified
- Fix prod defaults including an unnecessary space in
@font-faceCSS - Fix Scala 3 macro-generated class names stripping literal
$characters - Harden
addToDocument{,OnRegistration}to handle no<head>tag existing - Improve
CanIUse2.agentsForPlatformmatching resulting in more accurate vendor prefixing on JS - Optimise
Css.styleandComposeintermediate collection allocations - Optimise
Dsl.styleandDslBase.DslCondallocations - Optimise
Registerclass-name uniqueness checks from O(N) to O(1) - Optimise
StyleS.dataSortedto computeCond.toStringonce per condition and skip sorting for ≤1 condition - Optimise memory usage of attributes
- Optimise prefix generation for both speed and garbage collection
- Optimise Scala.js output size
- Support
grad,rad,turnangle units in modernhslcolour literals (c"...") - Support
image-setprefixing onbackgroundandbackgroundImage - Support 2-arg
overflow(x, y) - Support decimal values in modern
hslcolour literals (c"...") - Support decimal values in modern
rgbcolour literals (c"...") - Support fractional values on
animationIterationCount - Support multiple
Platforms inEnv, allowing you to generate CSS for multiple specific platforms - Support multiple values on
animationDirection - Support multiple values on
animationFillMode - Support multiple values on
animationIterationCount - Support multiple values on
animationName - Support multiple values on
animationPlayState - Support multiple values on
animationTimingFunction - Support multiple values on
transitionTimingFunction - Support reading the dev/prod setting from env var
SCALACSS_MODE
1.1.0 (commit log)
- Add 9 missing attributes to
Attrs.values(justifyItems,overflowAnchor, and 7 SVG attributes) - Deprecate
unary_-onResolutionas valid resolutions can't be negative - Do not emit unprefixed CSS declarations for features that only exist with vendor prefixes (eg.
box-reflect) - Emit post-render warnings for
@font-face - Fix
:/:ratio operator in DSL which inverted numerator and denominator (eg.4 :/: 3produced3/4instead of4/3) - Fix
.importantbreaking vendor prefixing on value-prefixed attributes (eg.cursor.zoomIn.important) - Fix
0.0.pxand-0.0.pxon the JVM to generate "0" - Fix
AttrCmp.conflictsfailing to find transitive/chained conflicts (eg. betweenmarginLeft,margin, andmarginRight) - Fix
CanIUse2.agentsForPlatformfailing to match mobile browser names (eg. "Firefox Mobile", "Chrome Mobile", "IE Mobile", "Opera Mini", "Opera Mobile") - Fix
CanIUse2value prefixing: prevent substring matches without word boundaries (eg. in URLs) from suppressing vendor prefixing, and support multi-line values - Fix
Cond.applyToStyle: update conditions on warnings, and merge colliding conditions usingCompose - Fix
fontLanguageOverridemissing from aliases - Fix
NaturalOrderingequating distinct strings with spaces or leading zeroes (which caused stylesheet conditions to collide and overwrite each other) - Fix
normalliteral missing from DSL andLiteralaliases (eg. forgap(10.px, normal)) - Fix
placeSelfdefining invalid CSS valuesleftAutoandrightNormal - Fix
prefixedregex matching substrings without word boundaries (eg.url(logo-o-2.png)) suppressing vendor prefixing - Fix
ScalatagsTextRendererHTML-escaping CSS inside<style>tags - Fix
StringRendererandCss.keyframesdefects:- Emit missing semicolons between multiple styles in a keyframe selector in
formatTiny - Merge duplicate keyframe selectors in
Css.keyframesinstead of overwriting earlier frames - Invoke
fmt.done()inStringRenderer.Raw - Quote font names containing spaces consistently in
Attrs.fontFamily(ff)and prevent double-quoting in@font-face
- Emit missing semicolons between multiple styles in a keyframe selector in
- Fix
styleF("name")not supporting custom domains - Fix
StyleLookup.booleanreturningSome(null)instead ofNonefor unpopulated boolean domains - Fix colour literals (eg.
c"#fff")- Accept hsl hue of 360
- Accept rgba with percentages
- Consistent error messages with empty strings and numbers greater than
Int.MaxValue
- Fix composing
addClassNames-only styles losing class names when composed into other styles, and avoid false duplicate classname warnings - Fix composite pseudo-class equality and ordering (eg.
&.hover.focus == &.focus.hover) - Fix CSS string escaping in
content.string(use 6-digit hex escapes, support surrogate pairs, and escape newlines/control characters) - Fix false conflicts between orthogonal CSS logical properties (eg.
blockSizeandinlineSize, ormarginBlockStartandmarginBlockEnd) - Fix invalid vendor value transforms on
textAlign,resize,float,clear, andcaptionSide, and vendor-prefixwidth.available - Fix media query composition: add
.orand.andonMedia.Query(deprecating&), and merge nested media queries withandinstead of, - Fix microseconds and nanoseconds being rendered as
0ms - Fix registration warnings dropped for styles inside
keyframes,unsafeChild,unsafeRoot, andStyleSheet.Standalone - Fix style composition (
Compose): prevent premature exact-match removal from masking conflicts, eliminate self-conflicts within operands, and preserve declaration order - Fix thread-safety in
Register.registerFontFace,internal.memo, andNameGen.nextShortPrefix - Fix wrong CanIUse subjects on
overscrollBehavior(usedoverflowAnchor) androwGap(usedmulticolumn) - In Scala.js, use
PlatformJsEnvinPlatform.envto detect browser platform instead of always usingEnv.empty - Multiple
background-clipvalues must be comma-separated, not space-separated - Only consider the last 10 versions of each browser when determining vendor prefixes
- Optimise Scala.js output size
- Parse
addClassName/addClassNamesinto distinctClassNames, fixingDOMExceptioninScalatagsJsDomon space-separated or empty class names - Reject invalid percentage values for
border,outline, andcolumnRule - Support modern
rgbandhslformats in colour literals (eg.rgb(255 0 0 / 0.5)) - The
ext-scalatagsmodule is now available for Scala 3 - Typos in CSS
interfaceshould beinterlace(in mediascan)sSmallshould bexSmall(x-small)attrStartsWithshould use^=instead of|=fontVariantionSettingsshould befontVariationSettings
- Update
caniusedata for CSS vendor-prefixing Update default prod settings to avoid generating class name
_adsas some ad-blockers replace itUpgrades
- Scala 2 -> 2.13.18
- Scala 3 -> 3.3.9
- ScalaJsDom -> 2.8.1
- ScalaJsReact -> 2.1.4
- Scalatags -> 0.13.1
- UnivEq -> 2.1.0