Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Can't override --paper-font-common-base_-_font-family from document level #148

@RhysyG

Description

@RhysyG

Description

Can't overwrite default font (Roboto) using custom property mixin when any paper font mixins are referenced ie: @apply(--paper-font-sunhead); as it looks like nested CSS variables get confused.

Live example:
https://codepen.io/rhysyg03/pen/YxgYQp?editors=1100

When a CSS variable is nested, in this example:

  • font-family: var(--paper-font-subhead_-_font-family)
  • refers back to
  • font-family: var(--paper-font-common-base_-_font-family)

--paper-font-subhead_-_font-family variable refers back to variable in the same declaration (html) even if it’s been overwritten (.my-class).

Expected outcome

The NEW --paper-font-common-base_-_font-family mixin would overwrite default variable.

Actual outcome

The NEW --paper-font-common-base_-_font-family mixin DOES NOT get overwritten.

Steps to reproduce

  1. add @apply(--paper-font-body1) to a Polymer element
  2. override the @apply --paper-font-common-base mixin with custom font from the document level

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions