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

Add CSS display-none utility #1120

Merged
merged 9 commits into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

- Update ouiTextSubduedColor in `next` dark theme ([#973](https://github.com/opensearch-project/oui/pull/973))
- Add `crossInCircleEmpty` and `power` icons ([#1044](https://github.com/opensearch-project/oui/pull/1044))

- Add CSS `display-none` utility ([#1120](https://github.com/opensearch-project/oui/pull/1120))
-
### 🐛 Bug Fixes

- Add exit code to compile-scss script on failure ([#1024](https://github.com/opensearch-project/oui/pull/1024))
Expand Down
18 changes: 18 additions & 0 deletions src-docs/src/views/utility_classes/utility_classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,24 @@ export default () => (
}
snippet={`<span className="oui-fullWidth">
/* Your content */
</span>`}
/>
<OuiSpacer />
<UtilityClassesSection
ShatilKhan marked this conversation as resolved.
Show resolved Hide resolved
code="oui-displayNone"
description={
<p>
Changes the element’s display property to{' '}
<OuiCode language="sass">display: None;</OuiCode>
ShatilKhan marked this conversation as resolved.
Show resolved Hide resolved
</p>
}
example={
<OuiMark style={wrappingExampleStyle} className="oui-displayNone">
Displaying None
ShatilKhan marked this conversation as resolved.
Show resolved Hide resolved
</OuiMark>
}
snippet={`<span className="oui-displayNone">
/* Your content */
</span>`}
/>
</>
Expand Down
1 change: 1 addition & 0 deletions src/global_styling/utility/_utility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
.oui-displayBlock {display: block !important;}
.oui-displayInline {display: inline !important;}
.oui-displayInlineBlock {display: inline-block !important;}
.oui-displayNone {display: none !important;}

.oui-fullWidth {
display: block !important;
Expand Down