Style attribute binding gets overridden by pre-rendering
See original GitHub issueI build a simple “parallax” using vuejs style binding :style
and I found out that the prerender-spa-plugin executed phantomjs, which added static inline styles (eg. style="-webkit-transform: translateY(0px);"
) which, once generated, overrides the actual style-binding of the app.
For this reason I would maybe propose the possibility of skipping inline-style attributes when pre-rendering the application…would that be easy to implement, or: does someone could point me towards a (good) solution to work around this issue?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Style Precedence - Angular
Bindings take precedence over static attributes because they are dynamic. In the following case, class and [class] have similar specificity, but the [class] ......
Read more >Angular2 innerHtml binding remove style attribute [duplicate]
My problem, that when I use innererHtml binding - angular2 remove all styles attributes. It's important for me, bacause in my task -...
Read more >ASP.NET Core Razor component lifecycle | Microsoft Learn
The lifecycle methods can be overridden to perform additional operations in components during component initialization and rendering.
Read more >Attribute, class, and style bindings
With attribute binding, you can improve accessibility, style your application ... The `class.special` binding overrides any value for the `special` class in ...
Read more >nytimes/backbone.stickit - GitHub
"data-stickit-bind-val" attributes in the DOM. This allows for binding non-string values from a prerendered <select>, assuming that you are using jQuery or a ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great idea!
I’m currently working on an adaptor of this that employs Chrome Headless via puppeteer instead of phantomJS, so we’ll soon have more robust API’s as that matures.
In terms of what you can do right now to solve this issue, consider using
options.postProcessHtml
by providing regex to strip out applicable:webpack.config.js
Hope that helps. Cheers.
no, sorry, I’m not sure I should be the one closing issues 😛