Skip to content

Instantly share code, notes, and snippets.

@StephenFluin StephenFluin/custom-properties.html Secret

Last active Feb 7, 2020
Embed
What would you like to do?
<div [style.--main-border-color]=" '#CCC' ">
<p style="border: 1px solid var(--main-border-color)">hi</p>
</div>
@StephenFluin

This comment has been minimized.

Copy link
Owner Author

StephenFluin commented Feb 6, 2020

@LayZeeDK

This comment has been minimized.

Copy link

LayZeeDK commented Feb 6, 2020

Should be this:

<div [style.--main-border-color]="'#CCC'">
<p style="border: 1px solid var(--main-border-color)">hi</p>
</div>
@gkalpak

This comment has been minimized.

Copy link

gkalpak commented Feb 7, 2020

Or even:

<div [style.--main-border-color]=" '#CCC' ">
  <p style="border: 1px solid var(--main-border-color)">hi</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.