Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I was wondering if there are any differences between CSS images and SVGs on your website.
By CSS images I mean images created with divs in HTML and styled in CSS (like this: https://codepen.io/andrewrock/pen/jOEZxrY).
Yes, CSS images are more time consuming, but apart from that they're both animatable, you can use CSS variables on them, make them dynamic with JS, ...
So what are the differences of those 2? (Performance, Rendering, ...)
There are countless reasons why you should use a svg instead of a group of html elements:
Creation
There are hundreds of svg editors that allow in a simple way to realize a drawing or an icon. This is not the case for html. So drawing a building icon in full css would be really painful.
Sharing
The fact that it uses a standardized file such as svg, allows you to export your work to other tools and easily be exploited by someone else. Use tricky css rules to manipulate some span or div can be difficult for a newcomer to your project to understand.
User experience
On a website that use svg, you will able to open it on a new tab or to download it. Thats very comfortable for an user for exemple. If you use html an user will not be able to manipulate and thats can be really annoying
Performance
Because the svg is called most of the time a file you can compressed it on your server to gain more space and performance with some tools like Appendix J
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed last month.
Improve this question
I'm trying to find ways to customize a website where I can only edit the content (text and image) via Contentful’s content management interface (the company that developed the website refuses to integrate the corporate identity and style guide and says it "might" be for future versions).
What do you think about adding HTML elements, inline CSS, or even adding style and loading fonts via style elements directly into the text fields? Given that these elements will obviously be in the middle of the body, is this really bad practice in terms of security and SEO (or other)?
Thank you a lot for your time.
I wouldn't say it's bad for security since it's just style (meaning how the users see the website).
Have you thought about linking the style file? It would maybe be a cleaner solution (don't forget you will have to maintain it later, and having it in a clear way will save you a lot of time reading and wondering what you did, so it's better to be clean) than adding everything inline inside body
As for SEO I believe it's more affected by the use of the elements than having the elements. I mean, if you want some content use instead of a tag that resembles by style to a heading.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Css got pretty much features and has a fair amount of flexibility. Unlike other languages ive never heard of other options to expect the same result. Event js seams to be the only active laguage in html pages. Did i miss anything? Or are there acctually no other options?
There are not.
JSSS was an early competitor to CSS, but swiftly lost and nothing supports it today.
Technically, you could involve XSLT … but that would involve processes such as converting to XSL Formatting Objects and then to PDF rather than styling HTML per se.
Well, there are also CSS pre-processors like SASS, LESS and Stylus... that improves the syntax and complements CSS itself. That code from pre-processors is transpiled to CSS so any browser could execute it. But they aren't alternatives to CSS.
There are technologies like Jquery or other frameworks where you can just change the way you write CSS but there isn't a way in designing a page without CSS as all this uses it as a main framework for design.There are alternatives like Sass Scss but all this rely on css
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I would like to convert (flip horizontally) my entire website to be used with RTL languages such as Hebrew and Arabic.
As far as I can imagine there are not a few properties I have to take care about in order to accomplish this task.
My website is pretty complicated in terms of CSS styling so I am looking for the most elegant and 100% working method to do so.
I have found some online tools but it seems they do not take care of every possible property and this simply breaks the website.
Can someone suggest a good and an elegant way?
Using different stylesheets for the RTL version:
This method became popular recently due to the rise of this plugins that automatically parse the CSS files and produce an RTL version.
1- Automate RTL and LTR language directions supoort With Grunt and Sass
2- Grunt plugin to convert CSS stylesheets between left-to-right and right-to-left
3- Bi App LESS
4- Bi App SASS
Also there is a Chrome extension called My Style This extension add a textarea to the pages the user visit. It is toggled by pressing ctrl + m. Whenever CSS declaration is added to it, it will affect all the pages on the this domain. The CSS isn’t removed until the user remove it manually. Using this extension, I start adding the overrides till I get the prefect result.
note: this answer collected from many sources and I did not test them, i hope it helps in someway, thanks !
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I use CSS to stylize my pages. I use % style instead of using px values. However, since I need to add several elements of different sizes in different positions, I end up spending more time in designing the layout than the coding.
I tried using a WYSIWYG editor but it uses px style coding. Can someone help me with a solution so that I can design the layout quickly and proceed to real part? I use WordPad right now.
The best thing to do is practice more. Get better at coding them, and reuse parts from prior projects where it makes sense.
There is no WYSIWYG tool that will save you time, for most projects. They all write garbage code, because editing with such a tool is a bit ambiguous. It is up to you as a web developer to write your markup and styles in a way that will be interpreted correctly across many user agents.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is it ok to copy css from different sites ?
I mean say I have copied navigation menu css from one site, sidebar css from other, button css from another, footer from another and so on...
Could I get in legal trouble for such kind of copying ??
Update : I thought it would make more sense if instead I showed you the design itself :)
If you also copy graphic design (background-image: url(img/bg-border-top.png);) definitely yes, you' re in legal trouble.
If you copy CSS without the images, you could have problems, IANAL, depending on your country, the sites you're stealing from and their respective country, etc
Using the same technique is perfectly OK (that is, parts of parts of CSS like CSS sprites here, accordion menu there, etc)
Now WHY? There are dozens of CSS frameworks, hundreds of templates and designs under licences like GPL or Creative Commons-Attribution (with derivatives and commercial use allowed) so why would you even care to take any risk copying (verbatim) CSS their authors don't want you to copy?
And for only $39, this WordPress theme is yours for the next 24H (entirely made of div yay! </joking>)
You can use everything on web that allows you to copy and paste, except images, videos, and content because this can have copyright issues.
For copying CSS, JavaScript, jQuery.... you are free to use it :)