Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "fix: improve high contrast mode",
"packageName": "@fluentui/react-drawer",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,16 @@ describe('DrawerInline', () => {
testDrawerBaseScenarios(DrawerInline);

describe('separator prop', () => {
it('should not render any border when separator is false', () => {
mountFluent(<DrawerInline id="drawer" position="start" open />);

cy.get('#drawer').should('not.have.css', `border-right-width`, '1px');
cy.get('#drawer').should('not.have.css', `border-left-width`, '1px');
});

it('should render correct border when when position is `start`', () => {
mountFluent(<DrawerInline id="drawer" position="start" separator open />);

cy.get('#drawer').should('not.have.css', `border-left-width`, '1px');
cy.get('#drawer').should('have.css', `border-right-width`, '1px');
cy.get('#drawer').should('not.have.css', `border-right-color`, 'transparent');
});

it('should render correct border when when position is `end`', () => {
mountFluent(<DrawerInline id="drawer" position="end" separator open />);

cy.get('#drawer').should('not.have.css', `border-right-width`, '1px');
cy.get('#drawer').should('have.css', `border-left-width`, '1px');
cy.get('#drawer').should('not.have.css', `border-left-color`, 'transparent');
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ const useBackdropStyles = makeStyles({
transitionProperty: 'opacity',
transitionTimingFunction: tokens.curveEasyEase,
willChange: 'opacity',

'@media screen and (prefers-reduced-motion: reduce)': {
transitionDuration: '0.001ms',
},
},

visible: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@ const useDrawerStyles = makeStyles({

/* Positioning */
start: {
...shorthands.borderRight(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStroke),

left: 0,
right: 'auto',
},
end: {
...shorthands.borderLeft(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStroke),

right: 0,
left: 'auto',
},
Expand Down