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
4 changes: 4 additions & 0 deletions .changeset/remove-base-icon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": major
---
`<pf-icon>`: Removed `BaseIcon` class. Reimplement (recommended) or extend `PfIcon`.
1 change: 0 additions & 1 deletion elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"./pf-dropdown/pf-dropdown-group.js": "./pf-dropdown/pf-dropdown-group.ts",
"./pf-dropdown/pf-dropdown-menu.js": "./pf-dropdown/pf-dropdown-menu.ts",
"./pf-dropdown/pf-dropdown-item.js": "./pf-dropdown/pf-dropdown-item.ts",
"./pf-icon/BaseIcon.js": "./pf-icon/BaseIcon.js",
"./pf-icon/pf-icon.js": "./pf-icon/pf-icon.js",
"./pf-jump-links/pf-jump-links-item.js": "./pf-jump-links/pf-jump-links-item.js",
"./pf-jump-links/pf-jump-links-list.js": "./pf-jump-links/pf-jump-links-list.js",
Expand Down
7 changes: 0 additions & 7 deletions elements/pf-badge/pf-badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,17 @@ import styles from './pf-badge.css';

/**
* A **badge** is used to annotate other information like a label or an object name.
*
* @cssprop {<length>} --pf-c-badge--BorderRadius {@default `180em`}
*
* @cssprop {<length>} --pf-c-badge--MinWidth {@default `2rem`}
*
* @cssprop {<length>} --pf-c-badge--PaddingLeft {@default `0.5rem`}
* @cssprop {<length>} --pf-c-badge--PaddingRight {@default `0.5rem`}
*
* @cssprop {<length>} --pf-c-badge--FontSize {@default `0.85em`}
* @cssprop {<length>} --pf-c-badge--LineHeight {@default `1.5`}
* @cssprop {<length>} --pf-c-badge--FontWeight {@default `700`}
*
* @cssprop {<color>} --pf-c-badge--Color {@default `#151515`}
* @cssprop {<color>} --pf-c-badge--BackgroundColor {@default `#f0f0f0`}
*
* @cssprop {<color>} --pf-c-badge--m-read--Color {@default `#151515`}
* @cssprop {<color>} --pf-c-badge--m-read--BackgroundColor {@default `#f0f0f0`}
*
* @cssprop {<color>} --pf-c-badge--m-unread--Color {@default `#fff`}
* @cssprop {<color>} --pf-c-badge--m-unread--BackgroundColor {@default `#06c`}
*/
Expand Down
13 changes: 4 additions & 9 deletions elements/pf-card/pf-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import style from './pf-card.css';
* users to access more details. For example, in dashboards and catalog views, cards
* function as a preview of a detailed page. Cards may also be used in data displays
* like card views, or for positioning content on a page.
*
* @summary Gives a preview of information in a small layout
*
* @slot header
* When included, defines the contents of a card. Card headers can contain images as well as
* the title of a card and an actions menu represented by the right-aligned kebab.
Expand All @@ -28,12 +26,9 @@ import style from './pf-card.css';
* text and/or active content.
* @slot footer
* Contains external links, actions, or static text at the bottom of a card.
*
* @csspart header - The container for *header* content
* @csspart body - The container for *body* content
* @csspart footer - The container for *footer* content
*
*
* @cssproperty {<color>} --pf-c-card--BackgroundColor {@default `#ffffff`}
* @cssproperty {<color>} --pf-c-card--BoxShadow {@default `0 0.0625rem 0.125rem 0 rgba(3, 3, 3, 0.12), 0 0 0.125rem 0 rgba(3, 3, 3, 0.06)`}
* @cssproperty {<color>} --pf-c-card--size-compact__body--FontSize {@default `.875rem`}
Expand Down Expand Up @@ -71,13 +66,13 @@ export class PfCard extends LitElement {
@property({ reflect: true }) size?: 'compact' | 'large';

/**
* Optionally apply a border radius for the drop shadow and/or border.
*/
* Optionally apply a border radius for the drop shadow and/or border.
*/
@property({ type: Boolean, reflect: true }) rounded = false;

/**
* Optionally allow the card to take up the full height of the parent element.
*/
* Optionally allow the card to take up the full height of the parent element.
*/
@property({ type: Boolean, reflect: true, attribute: 'full-height' }) fullHeight = false;

/**
Expand Down
22 changes: 0 additions & 22 deletions elements/pf-icon/BaseIcon.css

This file was deleted.

162 changes: 0 additions & 162 deletions elements/pf-icon/BaseIcon.ts

This file was deleted.

22 changes: 22 additions & 0 deletions elements/pf-icon/pf-icon.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
:host {
position: relative;
display: inline-block;
line-height: 0;
height: fit-content !important;
width: fit-content !important;
}

#container {
display: grid;
grid-template: 1fr / 1fr;
place-content: center;
}

#container.content ::slotted(*) {
display: none;
}

svg {
fill: currentcolor;
}

:host([size=sm]) #container { --_size: var(--pf-global--icon--FontSize--sm, 10px); }
:host([size=md]) #container { --_size: var(--pf-global--icon--FontSize--md, 18px); }
:host([size=lg]) #container { --_size: var(--pf-global--icon--FontSize--lg, 24px); }
Expand Down
Loading