-
Notifications
You must be signed in to change notification settings - Fork 2.9k
ScrollablePane SCSS to MergeStyles Part 2: Style Conversion #4010
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
Changes from 3 commits
bfefad5
0ed2201
e441d4a
159d2d9
e676d17
9afbccf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "changes": [ | ||
| { | ||
| "packageName": "office-ui-fabric-react", | ||
| "comment": "Converting SCSS to MergeStyles step 2 - style conversion", | ||
| "type": "minor" | ||
| } | ||
| ], | ||
| "packageName": "office-ui-fabric-react", | ||
| "email": "v-brgarl@microsoft.com" | ||
| } |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| import { IScrollablePaneStyleProps, IScrollablePaneStyles } from './ScrollablePane.types'; | ||
| import { | ||
| HighContrastSelector, | ||
| IStyle, | ||
| ITheme, | ||
| ITheme | ||
| } from '../../Styling'; | ||
|
|
||
| export const getStyles = ( | ||
|
|
@@ -14,15 +15,54 @@ export const getStyles = ( | |
|
|
||
| const { palette, semanticColors } = theme; | ||
|
|
||
| const AboveAndBelowStyles: IStyle = { | ||
| position: 'absolute', | ||
| pointerEvents: 'auto', | ||
| width: '100%', | ||
| zIndex: 1 | ||
| }; | ||
|
|
||
| return ({ | ||
| root: [ | ||
| 'ms-ScrollablePane', | ||
| { | ||
| // Insert css properties | ||
| overflowY: 'auto', | ||
| maxHeight: 'inherit', | ||
| height: 'inherit', | ||
| // @todo this doesn't work with JS | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a regression if we merge as-is?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually I should ask @dzearing about this. Unfortunately it is not included in the JS Api, so I it is not as simple as adding an IRawStyle. I did a little research, but the general comment was that if you want to get this specific with your styles, don't style with JS as it's just not there yet. This will not cause a visual regression though, only cause scroll behavior to differ on specific webkit browsers like Opera and Chrome. Also, @betrue-final-final do you know how important this rule is design wise, or if it was just added out of convenience? |
||
| // -webkit-overflow-scrolling: touch; | ||
| }, | ||
| className | ||
| ], | ||
| stickyContainer: [ | ||
| { | ||
| overflow: 'hidden', | ||
| position: 'absolute', | ||
| pointerEvents: 'none', | ||
|
|
||
| } | ||
| ], | ||
|
|
||
| // Insert className styles | ||
| stickyAbove: [ | ||
| { | ||
| top: 0, | ||
| selectors: { | ||
| [HighContrastSelector]: { | ||
| borderBottom: '1px solid WindowText' | ||
| } | ||
| } | ||
| }, | ||
| AboveAndBelowStyles | ||
| ], | ||
| stickyBelow: [ | ||
| { | ||
| bottom: 0, | ||
| selectors: { | ||
| [HighContrastSelector]: { | ||
| borderTop: '1px solid WindowText' | ||
| } | ||
| } | ||
| }, | ||
| AboveAndBelowStyles | ||
| ] | ||
| }); | ||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
cssstill being used somewhere?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch :)