Comments (13)
We have recently recreated all assets and released a new NPM 3.0.1 version https://github.com/webalys-hq/streamlinehq-npm/releases/tag/3.0.1, please install it, fetch newest images and check if it helps you. Now width/height are removed, viewBox is added.
from streamlinehq-npm.
@cbrwizard interesting... I'm importing from the exact same path. I wonder if it's a compatibility issue with vue-svg-loader
from streamlinehq-npm.
We're strongly considering wiping all height and width properties from our svgs and setting only viewBox instead (will do this for new icons packs at least). This should solve this issue. No ETA yet though as we're busy with releasing another feature right now
from streamlinehq-npm.
Proposed solution is to remove width and height params for all images and to set only viewbox param.
from streamlinehq-npm.
It appears there's an issue with the path in the new icon? I followed the steps to properly download icons from the @streamlinehq/streamlinehq
package but after upgrading, I'm having trouble changing the size of the svg. In the picture above, when changing the height from 24px to 16px, a good portion of the svg gets cutoff.
from streamlinehq-npm.
Hey, could you please check the steps described here https://github.com/webalys-hq/streamlinehq-npm#how-to-change-style-size-etc and check the example app as well https://github.com/webalys-hq/streamlinehq-npm/tree/master/docs/latest/example-app. There you will be able to find the way to change sizes of our SVGs.
Please respond if this resolves your issue
from streamlinehq-npm.
Hi @cbrwizard unfortunately I'm still having trouble. I think the issue is that there are hard coded width
and height
attributes on the svg files.
from streamlinehq-npm.
@dkh215 how are you importing the image? I've just updated the example app with an exact image you're trying to use where I reduce its size to 16px. Here is the final result, it doesn't get cut.
from streamlinehq-npm.
I've just installed the NPM packages and that's a big issue for me, because these height & width properties are killing the "responsiveness" of the SVG icons (with the hard coded #000
/ currentColor
issue there).
At this time I've added the [string-replace-loader](https://github.com/Va1/string-replace-loader)
, and I'm using it for deleting these parts before the file-loader
parses them (as well as replacing any #000
or #000000
color code with currentColor
). It works as intended, but it's quite a downgrade for me.
from streamlinehq-npm.
Looks vue-svg-loader
removes viewbox attributes by default. I updated that setting and can now adjust the width and height by wrapping each svg in a div element and then targeting the svg. This unblocks me for now but it would be great if hard coded width and height attributes were eventually removed.
from streamlinehq-npm.
Yup, setting a viewBox
is the correct solution. I'm also running into this issue. Setting width
and height
directly on the SVG isn't necessary and without the correct viewBox
defined, the SVG won't scale. Unfortunately, I'm also unable to set these imported icons as the src
on an image tag. I'm following the example app, but the images are broken in the browser. I know it's not my SVG loader since I can import them and use them inline--I just can't scale them.
from streamlinehq-npm.
Width / height are going to be removed in the following release #23 and they will have viewBox
only instead, so this issue will be fixed
from streamlinehq-npm.
Closing this issue since I believe it's fixed. Feel free to respond if you think otherwise
from streamlinehq-npm.
Related Issues (20)
- GitLab pages error HOT 3
- 404 streamline bold package HOT 5
- I cannot import svg files from a npm package HOT 8
- Allow specifying the dynamic name of the `.env` file to read based on NODE_ENV env var HOT 10
- How to import icons with the same name from different families? HOT 2
- Allowing the environment variables to be optional HOT 3
- Part of HumanResourcesSearchTeam icon is hidden when a fill color is set HOT 2
- Deployment failed HOT 2
- Using `spin` from the old npm package
- ReactComponent is not availaible for streamline-freehand HOT 4
- Updating `STREAMLINE_FAMILIES` and installing new images HOT 4
- Typescript support?
- Handle the case when backend is not responsive when installing NPM package HOT 1
- Some icons are blank HOT 11
- Deployment pipeline failed on Streamline icon HOT 9
- Same icon on material-solid family HOT 4
- Issues installing package on NEXT js as it uses .env.local HOT 2
- Got error "You can not download streamline-micro-bold family in SVG" HOT 4
- Unable to download the icons HOT 3
- When installing from node, getting an error on the icons' download HOT 3
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 streamlinehq-npm.