Skip to content
This repository has been archived by the owner. It is now read-only.

Add 'data-className' #11376

Closed
luixxiul opened this issue Oct 8, 2017 · 0 comments
Closed

Add 'data-className' #11376

luixxiul opened this issue Oct 8, 2017 · 0 comments

Comments

@luixxiul
Copy link
Contributor

@luixxiul luixxiul commented Oct 8, 2017

Description

Add data-className or like that to components to stop styles specified with className from overriding normalized styles.

<span className={css(
  styles.button,
  styles.button_clipboard
)}
  data-className={this.props.className}
/>

Example

Consider a case like this:

<ClipboardButton
  topTooltip
  dataL10nId='copyToClipboard'
  copyAction={this.onCopy}
  className={css(styles.letMeOverrideStyles)}
/>

That could cause a visual regression.

It should be ultimately converted with custom, which should be

<ClipboardButton
  topTooltip
  dataL10nId='copyToClipboard'
  copyAction={this.onCopy}
  custom={styles.letMeOverrideStyles}
/>

That would be possible like this:

<span className={css(
  styles.button,
  styles.button_clipboard,
  this.props.custom
)}
  data-className={this.props.className}
/>

In this way, you would be able to make components which accept custom styles only when this.props.custom is set.

Steps to Reproduce

Actual result:

Expected result:

Reproduces how often: [What percentage of the time does it reproduce?]

Brave Version

about:brave info:

Reproducible on current live release:

Additional Information

@cezaraugusto cezaraugusto added this to the Triage Backlog milestone Nov 8, 2017
@NejcZdovc NejcZdovc modified the milestones: Triage Backlog, Backlog (Prioritized) Nov 21, 2017
@bsclifton bsclifton removed this from the Backlog (Prioritized) milestone May 10, 2018
@bsclifton bsclifton added the wontfix label May 10, 2018
@bsclifton bsclifton closed this May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.