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

fix: selectors applied conditionally #209

Merged
merged 1 commit into from
Jan 20, 2021
Merged

Conversation

rabelloo
Copy link
Contributor

@rabelloo rabelloo commented Jan 20, 2021

Purpose

Sass' & will output the selector twice,
which is why the linter disallows it,
and our conditional selectors should account for that.

image

Approach

Apply with @if instead of function if which allows for better content control.
Create mixin for shareability.

Testing

Check output CSS.

image

Risks

Reorders stylelint rule, @include before $variable, which honestly is a better separation and allows local variables to be used in mixins.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2021

🎊 PR Preview 993badc has been successfully built and deployed to https://onfido-castor-preview-pr-209.surge.sh

🕐 Build time: 123.543s

🤖 By surge-preview

@rabelloo rabelloo force-pushed the fix/input-textarea-focus-border branch from 07872db to a1ff6ea Compare January 20, 2021 13:12
@josokinas josokinas self-requested a review January 20, 2021 13:15
Base automatically changed from fix/input-textarea-focus-border to main January 20, 2021 13:17
@rabelloo rabelloo force-pushed the fix/wrapped-self-selectors branch from a97ab73 to 84e1b52 Compare January 20, 2021 13:18
Sass' `&` will output the selector twice,
which is why the linter disallows it,
and our conditional selectors should account for that.
@rabelloo rabelloo force-pushed the fix/wrapped-self-selectors branch from 84e1b52 to 993badc Compare January 20, 2021 13:19
@rabelloo rabelloo self-assigned this Jan 20, 2021
@josokinas
Copy link
Contributor

P.S. Should this be fix(core)?

@rabelloo rabelloo merged commit e6cc6d5 into main Jan 20, 2021
@rabelloo rabelloo deleted the fix/wrapped-self-selectors branch January 20, 2021 13:22
@rabelloo
Copy link
Contributor Author

Yea the PR title didn't update but I included core as scope in the commit

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