Skip to content

Conversation

@kyledurand
Copy link
Member

WHY are these changes introduced?

Fixes #4659

WHAT is this pull request doing?

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

Copy-paste this code in playground/Playground.tsx:
import React from 'react';
import {Page} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      {/* Add the code you want to test in here */}
    </Page>
  );
}

🎩 checklist

@kyledurand kyledurand added the 🤖Skip Changelog Causes CI to ignore changelog update check. label Nov 17, 2021
@kyledurand kyledurand self-assigned this Nov 17, 2021
Comment on lines +83 to +87
--p-filter-icon: brightness(0) saturate(100%) invert(36%) sepia(13%)
saturate(137%) hue-rotate(169deg) brightness(95%) contrast(87%);

@include recolor-icon(var(--p-icon), transparent, var(--p-icon-filter));
--p-filter-icon-action-primary: brightness(0) saturate(100%) invert(20%)
sepia(59%) saturate(5557%) hue-rotate(162deg) brightness(95%) contrast(101%);
--p-filter-icon-on-interactive: brightness(0) saturate(100%) invert(100%);
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Nice. Thanks @kyledurand.


.SecondaryAction {
@include recolor-icon(var(--p-icon));
@include recolor-icon($fill-color: var(--p-icon));
Copy link
Member Author

Choose a reason for hiding this comment

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

Switching to named vars throughout this PR for clarity. Should make things slightly easier to figure out what's going on when we remove recolor-icon()

items={[
{
url: '/path/to/place',
url: '/',
Copy link
Member Author

Choose a reason for hiding this comment

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

We always have one active items in the nav within the admin. This change reflects that int he basic example

items={[
{
url: '/',
url: '/path/to/place',
Copy link
Member Author

@kyledurand kyledurand Nov 17, 2021

Choose a reason for hiding this comment

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

We had two active items in this example which should never happen. Undoing this one since the example is for selected secondary, which is below

@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2021

size-limit report

Path Size
cjs 165.95 KB (0%)
esm 96.52 KB (0%)
esnext 143.12 KB (+0.03% 🔺)
css 34.31 KB (+0.1% 🔺)

Copy link
Member

@aaronccasanova aaronccasanova left a comment

Choose a reason for hiding this comment

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

Updates look great! Note: I was mainly focused on validating the syntax and consistency of the updates since I am unfamiliar with this component and the recolor-icon mixin.

@kyledurand kyledurand merged commit b41d852 into main Nov 17, 2021
@kyledurand kyledurand deleted the navigation_fix-icon-filters branch November 17, 2021 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖Skip Changelog Causes CI to ignore changelog update check.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replacing filter() with css variables causes regression

3 participants