fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

request for shipping out "focus-border" mixin

Open fengyue1013 opened this issue 10 years ago • 8 comments

Sometimes in our project we want to use the focus-border mixin in fileoffice-ui-fabric-react/src/common/_focusBorder.scss. Could you consider ship it out?

fengyue1013 avatar Oct 18 '16 03:10 fengyue1013

@fengyue1013 - do you mean to place it in Fabric Core? Just trying to make sure we understand what you mean by shipping it out.

ericthompson avatar Oct 21 '16 20:10 ericthompson

I am not 100% convinced it's a good idea to expose this yet. We need to have a clear stance on how to generally support focus rectangles correctly (because it's nuanced), but the issue i'm nervous on is how the mixin works. Some things i don't like:

  • It messes with the element position to get the positioning of the rectangle correct. Unpredictable.
  • It is a very specific rule that it creates, so it becomes messy to override.

dzearing avatar Oct 21 '16 21:10 dzearing

Hi, @ericthompson We want to consume the useful focus-border mix-in in our project. We do not care about where they are placed.

From my understand, there are two ways to expose it:

  1. Move it to fabric-core project.
  2. Expose SASS files from fabric-react project.

Personally, I think the second way is better.

Currently, we are copy-paste-ing the mix-in code to our project. We think it is bad to do so.

lijunle avatar Oct 30 '16 17:10 lijunle

I think it makes sense in Fabric-core and as Fabric-react already distributes fabric-core's sass/css it will be available to consume in projects.

atneik avatar Oct 31 '16 19:10 atneik

I believe this was exposed in fabric-core.

dzearing avatar Nov 18 '16 23:11 dzearing

It hasn't been moved to Fabric Core yet. This mixin is still only in Fabric React.

mikewheaton avatar Nov 19 '16 00:11 mikewheaton

Opened fabric-core issue to track there https://github.com/OfficeDev/office-ui-fabric-core/issues/853

dzearing avatar Nov 23 '16 23:11 dzearing

Thank you, David

fengyue1013 avatar Nov 24 '16 02:11 fengyue1013