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 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Update ouiTextSubduedColor in `next` dark theme ([#973](https://github.com/opensearch-project/oui/pull/973))
- Add slugs to markdown headers ([#1051](https://github.com/opensearch-project/oui/pull/1051))
- 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))
- Add `Figma` icon and link to OUI Figma resources ([#1064](https://github.com/opensearch-project/oui/pull/1064))
- Implement validation for icon input source & set default icon to `Beaker` ([#1137](https://github.com/opensearch-project/oui/pull/1137))

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
code="oui-displayNone"
description={
<p>
Changes the element’s display property to{' '}
<OuiCode language="sass">display: none;</OuiCode>
</p>
}
example={
<OuiMark style={wrappingExampleStyle} className="oui-displayNone">
Displaying none
</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
1 change: 1 addition & 0 deletions src/themes/oui-next/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
Loading