Skip to content

If a style has a val of 0, it still gets styled #48

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

Merged
merged 5 commits into from
Jul 2, 2013
Merged

If a style has a val of 0, it still gets styled #48

merged 5 commits into from
Jul 2, 2013

Conversation

jlward
Copy link
Contributor

@jlward jlward commented Jul 2, 2013

No description provided.

@ghost ghost assigned jlward Jul 2, 2013
val = el.get('val')
if val is None:
return True
return val.lower() not in ['false', '0']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see this as a constant. DISABLED_STYLE_VALUES or some such.

Also, why are you doing the is None check?

I would have expected '' to be in your list of falsy values and just:

val = el.get('val', '').lower()
return val not in DISABLED_STYLE_VALUES

Jason Ward added 2 commits July 2, 2013 14:53
@winhamwr
Copy link
Contributor

winhamwr commented Jul 2, 2013

Looks good other than the refactor

jlward added a commit that referenced this pull request Jul 2, 2013
If a style has a val of 0, it still gets styled
@jlward jlward merged commit 23f799a into master Jul 2, 2013
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward added a commit that referenced this pull request Mar 14, 2014
If a style has a val of 0, it still gets styled
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward added a commit that referenced this pull request Mar 14, 2014
If a style has a val of 0, it still gets styled
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.

2 participants