Skip to content

Commit

Permalink
docs: rename css classes to not cause confusion with bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
nuke-ellington committed Feb 26, 2025
1 parent aab923b commit 362f0d9
Show file tree
Hide file tree
Showing 22 changed files with 43 additions and 40 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/components/card-list/card-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,6 @@ $CardList__Title__Height: 1.5rem;
}
}

::slotted(.d-none) {
::slotted(.display-none) {
display: none !important;
}
4 changes: 2 additions & 2 deletions packages/core/src/components/card-list/card-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ export class CardList {
childElements.forEach((element, index) => {
if (element instanceof HTMLElement) {
if (index > this.maxVisibleCards - 1) {
element.classList.add('d-none');
element.classList.add('display-none');
return;
}
element.classList.remove('d-none');
element.classList.remove('display-none');
}
});
this.hasOverflowingElements = childElements.length > this.maxVisibleCards;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
}
}

.d-none {
.display-none {
display: none;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ export class CategoryFilter {
>
<ix-icon
color={this.getIconColor()}
class={{ 'd-none': this.hideIcon }}
class={{ 'display-none': this.hideIcon }}
name={this.icon ?? iconSearch}
size="16"
></ix-icon>
Expand Down Expand Up @@ -859,7 +859,7 @@ export class CategoryFilter {
<span
class={{
'category-preview': true,
'd-none': this.category === '',
'display-none': this.category === '',
}}
>
{this.categories[this.category]?.label}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
margin-inline-end: $default-space;
}

.d-none {
.display-none {
display: none;
}
}

:host(.d-none) {
:host(.display-none) {
display: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class MapNavigationOverlay {
opacity: [0, 1],
easing: 'easeOutSine',
begin: () => {
this.hostElement.classList.remove('d-none');
this.hostElement.classList.remove('display-none');
},
});
}
Expand All @@ -81,7 +81,7 @@ export class MapNavigationOverlay {
easing: 'easeInSine',
complete: () => {
this.closeClick.emit();
this.hostElement.classList.add('d-none');
this.hostElement.classList.add('display-none');
},
});
}
Expand All @@ -93,7 +93,7 @@ export class MapNavigationOverlay {
<div
class={{
'color-indicator': true,
'd-none': (this.iconColor ?? this.color) === undefined,
'display-none': (this.iconColor ?? this.color) === undefined,
}}
style={{
'background-color':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
var(--theme-map-navigation-separator--background);
z-index: 99;

&.d-none {
&.display-none {
display: none;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class MapNavigation {
opacity: [1, 0],
easing: 'easeInSine',
complete: () => {
this.sidebar.classList.add('d-none');
this.sidebar.classList.add('display-none');
},
});
}
Expand All @@ -150,7 +150,7 @@ export class MapNavigation {
opacity: [0, 1],
easing: 'easeOutSine',
begin: () => {
this.sidebar.classList.remove('d-none');
this.sidebar.classList.remove('display-none');
},
});
}
Expand Down Expand Up @@ -179,7 +179,7 @@ export class MapNavigation {
opacity: [0, 1],
easing: 'easeOutSine',
begin: () => {
this.overlay.classList.remove('d-none');
this.overlay.classList.remove('display-none');
},
});

Expand Down Expand Up @@ -211,7 +211,7 @@ export class MapNavigation {
return;
}
this.overlay.firstChild?.remove();
this.overlay.classList.add('d-none');
this.overlay.classList.add('display-none');
},
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/select-item/select-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
}
}

:host(.d-none) {
:host(.display-none) {
display: none;
}
23 changes: 11 additions & 12 deletions packages/core/src/components/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export class Select implements IxInputFieldComponent<string | string[]> {

get visibleNonShadowItems() {
return this.nonShadowItems.filter(
(item) => !item.classList.contains('d-none')
(item) => !item.classList.contains('display-none')
);
}

Expand All @@ -267,7 +267,7 @@ export class Select implements IxInputFieldComponent<string | string[]> {

get visibleShadowItems() {
return this.shadowItems.filter(
(item) => !item.classList.contains('d-none')
(item) => !item.classList.contains('display-none')
);
}

Expand All @@ -276,7 +276,9 @@ export class Select implements IxInputFieldComponent<string | string[]> {
}

get visibleItems() {
return this.items.filter((item) => !item.classList.contains('d-none'));
return this.items.filter(
(item) => !item.classList.contains('display-none')
);
}

get selectedItems() {
Expand All @@ -296,7 +298,7 @@ export class Select implements IxInputFieldComponent<string | string[]> {
}

get isEveryDropdownItemHidden() {
return this.items.every((item) => item.classList.contains('d-none'));
return this.items.every((item) => item.classList.contains('display-none'));
}

@Watch('value')
Expand Down Expand Up @@ -700,13 +702,13 @@ export class Select implements IxInputFieldComponent<string | string[]> {

if (this.inputFilterText) {
this.items.forEach((item) => {
item.classList.remove('d-none');
item.classList.remove('display-none');
if (
!item.label
?.toLowerCase()
.includes(this.inputFilterText.toLowerCase())
) {
item.classList.add('d-none');
item.classList.add('display-none');
}
});
} else {
Expand All @@ -722,7 +724,7 @@ export class Select implements IxInputFieldComponent<string | string[]> {

private removeHiddenFromItems() {
this.items.forEach((item) => {
item.classList.remove('d-none');
item.classList.remove('display-none');
});
}

Expand Down Expand Up @@ -950,7 +952,7 @@ export class Select implements IxInputFieldComponent<string | string[]> {
show={this.dropdownShow}
closeBehavior={this.isMultipleMode ? 'outside' : 'both'}
class={{
'd-none': this.disabled || this.readonly,
'display-none': this.disabled || this.readonly,
}}
anchor={this.dropdownAnchorRef.waitForCurrent()}
trigger={this.dropdownWrapperRef.waitForCurrent()}
Expand Down Expand Up @@ -993,10 +995,7 @@ export class Select implements IxInputFieldComponent<string | string[]> {
this.updateSelection();
}}
></slot>
<div
ref={(ref) => (this.customItemsContainerElement = ref!)}
class="d-contents"
></div>
<div ref={(ref) => (this.customItemsContainerElement = ref!)}></div>
{this.isAddItemVisible() ? (
<ix-dropdown-item
data-testid="add-item"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/tests/card-list/card-list.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ regressionTest.describe('card-list: basic', () => {
regressionTest('layout scrolling end', async ({ page }) => {
await page.goto('card-list/layout-scroll');

const cards = await page.locator('ix-push-card:not(.d-none)');
const cards = await page.locator('ix-push-card:not(.display-none)');
await cards.last().scrollIntoViewIfNeeded();
await page.waitForTimeout(1000);
expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Tags from './../../auto-generated/ix-application/tags.md';

# Application

<div className="d-flex">
<div className="display-flex">
<Tags />
<LatestTags
url={'/docs/legacy/basic-navigation'}
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/docs/controls/checkbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import DocsCode from './_forms-checkbox_code.mdx';

# Checkbox

<div className="d-flex">
<div className="display-flex">
<Tags />
<DeprecatedTags
url="/docs/legacy/checkbox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import DeprecatedTags from '@site/src/components/Tags';

# Validation

<div className="d-flex">
<div className="display-flex">
<DeprecatedTags
url="/docs/legacy/validation"
hasDeprecatedAncestor={true}
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/docs/controls/input-date.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Tags from '@site/docs/auto-generated/ix-date-input/tags.md';

# Input (date)

<div className="d-flex">
<div className="display-flex">
<Tags />
<DeprecatedTags url='/docs/legacy/input' hasDeprecatedAncestor={true}></DeprecatedTags>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/docs/controls/input-number.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Tags from '@site/docs/auto-generated/ix-number-input/tags.md';

# Input (number)

<div className="d-flex">
<div className="display-flex">
<Tags />
<DeprecatedTags url='/docs/legacy/input' hasDeprecatedAncestor={true}></DeprecatedTags>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/docs/controls/input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import DocsCode from './\_input_code.md';

import Tags from './../auto-generated/ix-input/tags.md';

<div className="d-flex">
<div className="display-flex">
<Tags />
<DeprecatedTags url='/docs/legacy/input' hasDeprecatedAncestor={true}></DeprecatedTags>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/docs/controls/radio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import DocsCode from './_radio_code.mdx';

# Radio

<div className="d-flex">
<div className="display-flex">
<Tags />
<DeprecatedTags url='/docs/legacy/radiobutton' hasDeprecatedAncestor={true}></DeprecatedTags>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/docs/controls/textarea.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Tags from '@site/docs/auto-generated/ix-textarea/tags.md';

# Textarea

<div className="d-flex">
<div className="display-flex">
<Tags />
<DeprecatedTags url='/docs/legacy/textarea' hasDeprecatedAncestor={true}></DeprecatedTags>
</div>
Expand Down
4 changes: 4 additions & 0 deletions packages/documentation/src/components/Tags/LegacyTag.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* LICENSE file in the root directory of this source tree.
*/

.TagContainers {
display: flex;
}

.TagContainer {
display: flex;
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/src/components/Tags/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function LegacyTag(
}>
) {
return (
<div className="TagsContainer d-flex">
<div className="TagsContainer">
{!props.hasDeprecatedAncestor && (
<span className="Api__Table Docs__Tag Docs__Tag__Deprecated">
Deprecated since {props.deprecationVersion}
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/src/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ a.menu__link {
background-color: var(--theme-color-2);
}

.d-flex {
.display-flex {
display: flex;
}

Expand Down

0 comments on commit 362f0d9

Please sign in to comment.