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

Add functionality to clear all inline styles by passing in an empty object #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NomNomCameron
Copy link

This PR includes functionality to clear the inline styles from an element by passing the S instance an empty object.

function proxy(prop, rules){
if (arguments.length == 1) {
if (typeof prop == 'string')
return read(prop);
else for (var i in prop)
else if (typeof prop == 'object' && Object.keys(prop).length === 0) {
Copy link
Owner

Choose a reason for hiding this comment

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

If prop is null here this will error. Not sure how to best detect a reset with an empty object...

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

Successfully merging this pull request may close these issues.

2 participants