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

Allow CSS inheritance #179

Merged
merged 3 commits into from
Oct 23, 2021
Merged

Allow CSS inheritance #179

merged 3 commits into from
Oct 23, 2021

Conversation

stijndcl
Copy link
Collaborator

@stijndcl stijndcl commented Oct 23, 2021

Add an option to allow a property to be inherited by a parent element, False by default because exercises will probably require the elements themselves to have this property.

All validators checks now pass again (#170), only emmet is left.

If you merge this PR after #178, remember to change the base branch to main instead of check_decorators.

@stijndcl stijndcl added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 23, 2021
@stijndcl stijndcl added this to the 1.0 milestone Oct 23, 2021
@stijndcl stijndcl self-assigned this Oct 23, 2021
@stijndcl stijndcl changed the base branch from main to check_decorators October 23, 2021 11:36
@QuintenVervynck
Copy link
Collaborator

allow_inheritance: bool = False
Shouldn't we make True the default for this, since this is also how css works?

@stijndcl
Copy link
Collaborator Author

stijndcl commented Oct 23, 2021

allow_inheritance: bool = False Shouldn't we make True the default for this, since this is also how css works?

I wasn't exactly sure what to do with it because, as you said, True also makes sense. I went with the safe route: if the exercise says the <img> should be centered, then require the <img> itself to be centered instead of allowing the entire page to be centered (which coincidentally also centers the <img>). Putting the <img> inside of a centered <div> also centers it, so it's technically correct, but the exercise doesn't really specify if it's allowed or not.

"Make the text red" implies the text itself has to be red, not the entire <body> (which cascades it onto the text).

@stijndcl stijndcl merged commit ab9d327 into check_decorators Oct 23, 2021
@stijndcl stijndcl deleted the css_inheritance_checks branch October 23, 2021 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants