8000 fix(fa-wildcard): converted @import to @use, removed * by mattnolting · Pull Request #7035 · patternfly/patternfly · GitHub
[go: up one dir, main page]

Skip to content

fix(fa-wildcard): converted @import to @use, removed *#7035

Merged
mcoker merged 3 commits intopatternfly:mainfrom
mattnolting:fix-fa-wildcard-6508
Sep 10, 2024
Merged

fix(fa-wildcard): converted @import to @use, removed *#7035
mcoker merged 3 commits intopatternfly:mainfrom
mattnolting:fix-fa-wildcard-6508

Conversation

@mattnolting
Copy link
Collaborator
@mattnolting mattnolting commented Sep 3, 2024

closes #6508

Backstop Report

Performance metrics

Before

Screenshot 2024-09-09 at 6 47 16 AM

After

Screenshot 2024-09-09 at 6 51 04 AM

@patternfly-build
Copy link
Collaborator
patternfly-build commented Sep 3, 2024

Copy link
Contributor
@mcoker mcoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm missing something, this doesn't conditionally include FA? You should be able to disable FA entirely with $pf-v6-global--disable-fontawesome: true; and include FA via the CDN links with $pf-v6-global--enable-fontawesome-cdn: true;

@mattnolting
Copy link
Collaborator Author
mattnolting commented Sep 4, 2024

Unless I'm missing something, this doesn't conditionally include FA? You should be able to disable FA entirely with $pf-v6-global--disable-fontawesome: true; and include FA via the CDN links with $pf-v6-global--enable-fontawesome-cdn: true;

@mcoker think you need to expand the changed files view, the conditional hasn't changed 👍

@mcoker
Copy link
Contributor
mcoker commented Sep 4, 2024

@mattnolting this block is what used to conditionally include the FA stylesheets, but was removed in this PR -

* {
@extend %pf-fa-local;
}

Also when I set $pf-v6-global--disable-fontawesome: true;, the FA stylesheets are still included in the compiled CSS

Copy link
Contributor
@mcoker mcoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two questions, but otherwise LGTM. Gonna merge and we can follow-up if needed on the questions.

@@ -1,4 +1,5 @@
@use '../sass-utilities' as *;
@use '../assets/fontawesome/variables' as *;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why this is needed?

line-height: 1;
}

@if not($pf-v6-global--disable-fontawesome) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit, but this conditional already exists in this file. Could you move the block here up to the existing conditional?

} @else {
@font-face {
font-family: "Font Awesome 5 Free";
font-style: normal;
font-weight: 900;
src:
url("#{$fa-font-path}/fa-solid-900.woff2") format("woff2");
}
// stylelint-disable
.fa,
.fas {
font-family: "Font Awesome 5 Free";
font-weight: 900;
}
// stylelint-enable
@include icons.pf-fa-icon-vars;
}

width: #{$fa-fw-width};
}

@debug $fa-css-prefix; No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a reminder to remove this before merging

@mcoker mcoker merged commit 020d936 into patternfly:main Sep 10, 2024
@patternfly-build
Copy link
Collaborator

🎉 This PR is included in version 6.0.0-prerelease.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove wildcard from font awesome icon classes

3 participants

0