Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allows to grow in width for labels with four or more characters #71

Closed
wants to merge 1 commit into from

Conversation

renfeng
Copy link

@renfeng renfeng commented May 30, 2018

It helps to solve problems like this, PolymerEl/paper-tags#28

@e111077
Copy link
Contributor

e111077 commented Jun 7, 2018

This is technically a breaking change; it would also break a lot of visual diff tests. Perhaps have a flag / property that you can set that will set a class on the element so that it can conditionally switch to this behavior

@e111077
Copy link
Contributor

e111077 commented Jun 14, 2018

Please reopen when requested changes are made

@e111077 e111077 closed this Jun 14, 2018
@renfeng
Copy link
Author

renfeng commented Jun 14, 2018

What were the changes requested?

@e111077
Copy link
Contributor

e111077 commented Jun 14, 2018

Can this feature be hidden behind a flag e.g.

<style>
  .badge.grow { min-width: var(--paper-badge-width, 20px); }
  .badge.nogrow { width: var(--paper-badge-width, 20px); }
</style>
...
<div class$="badge [[__badgeClass(grow)]]">
...
<script>
Polymer({
  properties: { grow: { type: boolean, value: false }, ... }
  __badgeClass(shouldGrow) { return shouldGrow ? 'grow' : 'nogrow'; },
  ...
})
</script>

but with better variable / fn names...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants