question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding "fill" to keys?

See original GitHub issue

Hello

Is it possible to add extra css properties like “fill” so that they are recognised by the color transformation when using variants.

For example I have a token for a button

primary: {
   ...shared,
   color: "PrimaryWhite",
   bg: "PrimaryBlack.0",
   ":hover": {
     bg: "PrimaryBlack.1"
   },
   "path" : {
     fill: 'PrimaryWhite'
   }
 }

Which when styled with emotion

const Button = styled.button(
    props => css(props.theme.buttons[props.kind])
);

Which on the element returns the css :

.css-1p77o0p-Button {
    color: #fff;
    background-color: #000;
}

.css-ofzrbh-Button path {
    fill: PrimaryWhite;
}

I had a look https://styled-system.com/api#system but haven’t had any luck using it.

Any help appreciated!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jxnblkcommented, Aug 12, 2019

The fill and stroke properties should now be supported in the latest version of @styled-system/css. You might need to update dependencies in your lock file to see the changes

1reaction
jxnblkcommented, Aug 6, 2019

Going to keep this open because I think support the fill property would be a good addition

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Excel Keyboard Shortcuts for Font or Fill Colors
Open the Color Palette Menus with Alt+H+ · Quick Access Toolbar · F4 Key or Alt+Enter · Copy/Paste Formatting · Keyboard Shortcuts Add-in ......
Read more >
Best Shortcuts to Fill Color in Excel (Basic & Advanced)
Here is how you can use the F4 key to fill color in Excel: Select a cell in which you want to fill...
Read more >
Excel: shortcut for applying fill color directly
I like to navigate with the Alt-shortcuts and selecting orange over and over again from the large selection of colors (screenshot 2) takes...
Read more >
15 Keyboard Shortcuts for Fill Color in Excel - Causal
15 Keyboard Shortcuts for Fill Color in Excel · Ctrl+Shift+5: This shortcut will fill the selected cells with the color black. · Ctrl+Shift+6:...
Read more >
How to use the Excel Fill Color Shortcut - Quick Guide - Excelkid
Select the cells that you want to color · Press Alt, H, H top open the Fill color menu · Use the arrow...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found