Comments (5)
As for breaching the abstraction layer of the icons module, it seems to me that
@blueprintjs/core
already does this by specifying all of the font icon classes
That's a good point... we should move that CSS to @blueprintjs/icons
and keep all the icon font related code in one place which can be optionally loaded. I suppose that was not considered carefully in #4505 and #4513 - the focus of those PRs was on JS bundle modularity rather than CSS modularity.
To be extra safe, I think the change to move the icon font CSS to @blueprintjs/icons
should happen in v6.0.
In the meantime, I can fix your reported regression by moving the .bp5-icon-svg path { transform-origin: center }
style to @blueprintjs/core as you suggested. I'll go ahead and create a PR and push a patch for that fix.
from blueprint.
I ended up with a different solution which reverts to applying transformOrigin
directly in the static icon component template, see #6639
from blueprint.
Thanks for pointing this out, I see that this might be a regression if you were not previously importing blueprint-icons.css
. However, I don't think that was ever endorsed as a supported usage pattern for anyone rendering Blueprint icons, even if you're only using static components. The Getting started docs instruct users to import blueprint-icons.css
.
We could fix the problem by moving these styles to @blueprintjs/core, but that breaches the abstraction layer of the @blueprintjs/icons module.
Are there any downsides to importing blueprint-icons.css
in your app?
from blueprint.
I think this issue probably raises some good questions with respect to Blueprint usage given the new static icon import paradigm.
We stopped importing blueprint-icons.css
to avoid including the icon font in our bundle. I suppose one could argue that it doesn't matter if it's never used, but generally speaking I think it's best practice to only bundle resources that are actually used.
As for breaching the abstraction layer of the icons module, it seems to me that @blueprintjs/core
already does this by specifying all of the font icon classes:
.bp5-icon-add::before{
content:"\f109";
}
...
I do wonder why this exists in the core CSS file instead of the icons CSS? It adds quite a bit of extra heft to our CSS file that is never used.
from blueprint.
we should move that CSS to @blueprintjs/icons and keep all the icon font related code in one place which can be optionally loaded
Yep sounds like a good change and makes sense to do it in a new major version.
from blueprint.
Related Issues (20)
- PanelStack2's animation when opening a new panel happens in the wrong direction
- shouldDismissPopover should still work in MenuItems with onClick handler even when they have submenus HOT 1
- Unable to compile BluePrint v5 SCSS HOT 2
- Disabled checkbox check icon has confusing fill opacity
- Include TimePicker in Datetime2 package?
- Add possibility to keep Drawer mounted.
- Toaster with timeout zero is dismissed early HOT 3
- [TimezoneSelect] Include list of fixed time zone offsets
- Upgrade to date-fns v3 HOT 2
- Overlay has old onClosed callback stored
- Dialog component does not cleanup the overlay's side effects on redirects without onClose
- Background elements of Dialog/Drawer should be unfocus-able and hidden. Headers in background should not show up in screenreader heaver navigation
- Allow consumer to specify tag level on Dialog/Drawer title to help screenreader users navigate.
- Cannot use tab key to navigate through Blueprint tabs HOT 2
- SegmentedControl--options.label should be a ReactNode, not just a string
- Slider popover in hidden overflow div HOT 1
- daterangepicker missing css style display: flex HOT 1
- Sort by clicking on the table header only
- Add `leftElement` support to `DateInput3`
- InputGroup & react-hook-form HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blueprint.