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

Directionality mixins don't work by default? #1223

Open
sabintim opened this issue May 1, 2020 · 0 comments
Open

Directionality mixins don't work by default? #1223

sabintim opened this issue May 1, 2020 · 0 comments

Comments

@sabintim
Copy link

sabintim commented May 1, 2020

Looks like the some of the LTR mixins in the following file don't work by default?
(e.g., when there is no dir="ltr" attribute in the DOM explicitly).

Should LTR be treated as default if the attribute is absent?
Is this by design?

https://github.com/OfficeDev/office-ui-fabric-core/blob/master/src/sass/mixins/_Directionality.Mixins.scss

E.g., ms-margin and ms-margin-left don't look consistent in the default behavior.

// This one will produce LTR margins by default even when dir=... is not present in the page
@mixin ms-margin($top, $right, $bottom, $left) {
  margin: $top $right $bottom $left;

  @include ms-RTL {
    margin: $top $left $bottom $right;
  }
}

// This one will not produce any margin if dir=... is not explicitly specified in page
@mixin ms-margin-left($distance) {
  @include ms-LTR {
    margin-left: $distance;
  }

  @include ms-RTL {
    margin-right: $distance;
  }
}
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

No branches or pull requests

1 participant