Comments (7)
Released with v4. Thanks!
from svelte-fa.
To clarify, the usual way around this is to use class:some={true}
to dynamically style elements - the classes aren't inline
from svelte-fa.
We support inline style to meet the following use cases:
<FaLayers size="4x" style="background: mistyrose">
<Fa icon={faEnvelope} />
<FaLayersText scale={0.2} translateX={0.4} translateY={-0.4} color="white" style="padding: 0 .2em; background: tomato; border-radius: 1em">
1,419
</FaLayersText>
</FaLayers>
https://cweili.github.io/svelte-fa/#layering---text
from svelte-fa.
Hmm, yeah, if values are passed to the component directly, that's unfortunately a little bit complicated - I see only one option that doesn't violate the CSP - add them with a JS function (see https://stackoverflow.com/a/57633533)
from svelte-fa.
Would you be willing to accept a PR?
from svelte-fa.
@marekdedic Yes, please feel free to submit a PR!
from svelte-fa.
@marekdedic Please see #308 (comment)
from svelte-fa.
Related Issues (20)
- How to inline? HOT 2
- Build error with SvelteKit HOT 1
- SvelteKit/Vite Not Working HOT 5
- Plans on supporting FontAwesome's library feature? HOT 1
- Size control HOT 2
- False positive with `eslint-plugin-import` HOT 2
- Is property `icon` required in `<FaLayers />`? HOT 4
- FaLayers & FaLayersText not working with sveltekit HOT 7
- Error: Not found: /fa.svelte HOT 2
- Type of flip prop HOT 1
- `pulse` class is applying `spin` animation HOT 1
- Docs for v6 usage? HOT 4
- Error: Not found: /fa.svelte HOT 4
- Sizing with css HOT 1
- SVG Symbols?
- Docs not building correctly
- Add way to locally preview changes HOT 1
- update package.json for vite5 / svelte 3 HOT 4
- #315 broke CSP HOT 1
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 svelte-fa.