Skip to content

Commit

Permalink
Disable generated outline css mixin in basic cases
Browse files Browse the repository at this point in the history
Going to rework it completely as it can cause performance issues and is still relatively useless until safari supports rounded outlines.
  • Loading branch information
somebee committed May 29, 2023
1 parent 71b13e3 commit 51cbdc2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/imba/src/compiler/styler.imba
Original file line number Diff line number Diff line change
Expand Up @@ -1044,8 +1044,8 @@ export class StyleTheme
return o

def outline params
# outlined
if params.length == 3
# TODO use :where() selector for 0 specificity outline defaults
if params.length == 3 or (params.length == 1 and String(params[0]) == 'none')
return {outline: [params]}
let o = {__outline__: yes}
if isNumeric(params[0])
Expand Down Expand Up @@ -1536,7 +1536,7 @@ export class StyleRule
continue

elif key.match(/^outline-?/)
meta.outline = yes
# meta.outline = yes
parts.push "{key}: {value} !important;"

elif key.match(/^(x|y|z|scale|scale-x|scale-y|skew-x|skew-y|rotate)$/)
Expand All @@ -1560,6 +1560,9 @@ export class StyleRule

elif key.match(/^__ease__$/)
yes
elif key.match(/^__outline__$/)
meta.outline = yes

else
if key.match(/^(width|height)$/)
# what about min/max sizes?
Expand Down

0 comments on commit 51cbdc2

Please sign in to comment.