406 questions
3 votes
1 answer
229 views
Static styles injected by Angular during build time causes CSP violation
I am working on a Angular 18 project. My org has the strict CSP policy and no unsafe-inline is allowed. As documented by Angular here, while rendering the index.html, I generate a nonce per request ...
0 votes
4 answers
68 views
Remove white-space inside inline style with JS?
A CMS generates inline styles with many whitespaces in them, which makes it difficult to traverse and select element via dev tools. An example of that would be: style=" --...
1 vote
1 answer
79 views
Changing inline CSS using JavaScript isn't working
I'm trying to change the width of an element using JavaScript. This doesn't throw any error. It instead silently ignores the code. pageSettings = { 'padding': 16 } document.querySelector('#...
1 vote
2 answers
568 views
Difference between [ngStyle] and [style] for inline styling in Angular
What's that difference between using [ngStyle] and [style.<attr>] for inline styling components in Angular?
0 votes
0 answers
240 views
Overwite PrimeNG component styles directly on HTML template with tailwind
So I'm working with PrimeNG's panel menu component, and I need to apply some styles directly using Tailwind classes instead of inline styles or external CSS. PrimeNG PanelMenu component This is my ...
-3 votes
2 answers
72 views
Why margins/paddings of display: inline is work? [closed]
I have read the [W3Schools][1] and they said display: inline-block, the top and bottom margins/paddings are respected, but with display: inline they are not. But, I have try to set the margin and ...
2 votes
0 answers
44 views
React CSS multiple inline styles VS class performance-wise
Who wins from performance perspective (only) INLINE STYLES <div style={{backgroundColor:"#fff"}}>content</div> <div style={{backgroundColor:"#fff"}}>content</...
0 votes
0 answers
57 views
Images are showing up as blank in Web Outlook, rendering properly among other apps, including desktop Outlook
My email is showing images correctly in all mailboxes and platforms except Web (browser) Outlook, where they are simply rendered blank. The "image" is still clickable, and takes up space on ...
0 votes
1 answer
280 views
ckEditor 5 Font and Ident dependencies/modules contain inline styles and violate my CSP
I am using CKEditor 5 with a custom build to include the fonts and indent modules into the basic build that exists on github. My web environment CSP doesn't allow any inline styles or javascript. ...
0 votes
1 answer
229 views
Inline CSS - Inline SVG url not showing up as background image
I want to add Inline SVG in inline CSS, but it is not working. <div style="background: url(data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20version%3D'1.1'%...
0 votes
2 answers
86 views
How to handle long words In email newsletter design for yahoo and AOL mail
Actually I'm creating newsletter design which is two columns, and it has images, title and text on each column respectively. Currently, facing layout styling issues where I can't able to handle long ...
0 votes
1 answer
67 views
Background image not displaying when applied via class with embedded CSS
I'm facing an issue with setting a background image using a CSS class with embedded CSS. Here's the CSS code I'm using: .test-background { background-image: url('/img/roads.jpg'); background-...
0 votes
1 answer
234 views
JavaScript remove Attribute or Property won"t work
The first step to open the menu works. But when i want to close it again it won't remove the inline style. Tried different ways to get the result but nothing of it will work. CSS has just some text-...
0 votes
2 answers
42 views
Problem with displaying an image as a background on a div in react
I have this problem where the image just won't be displayed as the background of the div. even though the image is displayed normally when put in an image tag. <div className="card text-dark &...
0 votes
1 answer
1k views
Issue when implementing CSP on existing laravel project, eval() and inline style on csp not working
Im having an issue when implementing CSP for styles and script on an existing laravel 6 project, i've manged to follow a with one of the guidance to name: spatie/laravel-csp content-security-policy....