Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Directionality: Reduce unnecessary specificity of box shadows #1129

Merged
merged 1 commit into from
Jul 10, 2018

Conversation

mikewheaton
Copy link
Contributor

Prior to this change, the ms-box-shadow() mixin was using the LTR and RTL mixins for all shadows, even those that were identical for both directions.

[dir='ltr'] .vertical {
  box-shadow: 0 10px 5px 5px rgba(0, 0, 0, 0.5);
}
[dir='rtl'] .vertical {
  box-shadow: 0 10px 5px 5px rgba(0, 0, 0, 0.5);
}

It will now only return a single style, with less specificity, for vertical shadows:

.vertical {
  box-shadow: 0 10px 5px 5px rgba(0, 0, 0, 0.5);
}

@mikewheaton mikewheaton added this to the 9.7.0 milestone Jul 10, 2018
@mikewheaton mikewheaton requested a review from Jahnp July 10, 2018 17:50
Copy link

@oengusmacinog-zz oengusmacinog-zz left a comment

Choose a reason for hiding this comment

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

Nice logic!

@mikewheaton mikewheaton merged commit c177c92 into master Jul 10, 2018
@mikewheaton mikewheaton deleted the miwhea/shadow-directionality-improvement branch July 10, 2018 19:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants