Description
With the Polymer 2.0 update inbound and breaking changes expected, it might be time to clear out the deprecated --text-primary-color and --default-primary-color values from default-theme.html.
The substitution of --default-primary-color to --primary-color is self-explanatory.
However, --text-primary-color is not so simple. From what I've read it had the meaning "text color over primary colored backgrounds". After it's deprecation, this appears to have been patched in many places as --dark-theme-text-color (defaults to #FFFFFF). However usage like this is confusing as well as demonstrated by #110.
I propose renaming --text-primary-color to --primary-contrast-color and --accent-contrast-color, which would be the foreground color on the primary and accent background colors respectively.
The definition of contrast used here being "strikingly different from something else". I believe this to be clear enough to replace the existing --text-primary-color. For a single alternative name, you could use --contrast-color or --contrast-text-color which would default to --dark-theme-text-color.
The word 'contrast' may not be the ideal fit, but IMO it's meaning is concise enough for widespread use.
Reasoning
- These variables have been deprecated since at least Dec 2015.
- Switching to the dark theme would be less troublesome with the core elements.
- Clarity of meaning regarding 'random' use of
--dark-theme-text-color variables
- Ease of changing foreground color of
paper-fab-like accent elements (e.g. dark grey foreground)
Conflicts
These are the changes required to roll out this update. "Critical" changes are breaking changes.
- CRITICAL: Substitute
--text-primary-color in paper-fab.html.
- Non-functional change: Substitute
--default-primary-color with --primary-color in paper-dialog-shared-styles.html
- CRITICAL: Update mentions of
--text-primary-color and --default-primary-color in paper-styles/demo/index.html
- Appropriately substitute
--dark-theme-text-color throughout the PolymerElements catalog with --primary-contrast-color or --accent-contrast-color as required.
Requirements for a P2.0 Migration Tool
As part of any Polymer 2.0 Migration Tool, the following substitutions would be performed if this change is implemented.
--default-primary-color --> --primary-color
--text-primary-color --> --primary-contrast-color in most use cases and --accent-contrast-color in a select few (such as paper-fab).
Description
With the Polymer 2.0 update inbound and breaking changes expected, it might be time to clear out the deprecated
--text-primary-colorand--default-primary-colorvalues from default-theme.html.The substitution of
--default-primary-colorto--primary-coloris self-explanatory.However,
--text-primary-coloris not so simple. From what I've read it had the meaning "text color over primary colored backgrounds". After it's deprecation, this appears to have been patched in many places as--dark-theme-text-color(defaults to #FFFFFF). However usage like this is confusing as well as demonstrated by #110.I propose renaming
--text-primary-colorto--primary-contrast-colorand--accent-contrast-color, which would be the foreground color on the primary and accent background colors respectively.The definition of contrast used here being "strikingly different from something else". I believe this to be clear enough to replace the existing
--text-primary-color. For a single alternative name, you could use--contrast-coloror--contrast-text-colorwhich would default to--dark-theme-text-color.The word 'contrast' may not be the ideal fit, but IMO it's meaning is concise enough for widespread use.
Reasoning
--dark-theme-text-colorvariablespaper-fab-like accent elements (e.g. dark grey foreground)Conflicts
These are the changes required to roll out this update. "Critical" changes are breaking changes.
--text-primary-colorin paper-fab.html.--default-primary-colorwith--primary-colorin paper-dialog-shared-styles.html--text-primary-colorand--default-primary-colorin paper-styles/demo/index.html--dark-theme-text-colorthroughout thePolymerElementscatalog with--primary-contrast-coloror--accent-contrast-coloras required.Requirements for a P2.0 Migration Tool
As part of any Polymer 2.0 Migration Tool, the following substitutions would be performed if this change is implemented.
--default-primary-color-->--primary-color--text-primary-color-->--primary-contrast-colorin most use cases and--accent-contrast-colorin a select few (such aspaper-fab).