NATION

PASSWORD

SVGs for Nation Flag?

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
Avexrias
Civil Servant
 
Posts: 6
Founded: Dec 21, 2014
Ex-Nation

SVGs for Nation Flag?

Postby Avexrias » Mon Apr 04, 2016 8:02 pm

Wacky question, but will there be support in the future for either .svg based flags, or embedded HTML5 SVG markup for our nation flags? Pretty much every browser supports SVG at this point, and might make things look a bit smoother.

I think you can use SVGs for the factbook, but only raster for flags. Main limitation I am seeing are all of the manual resizes of the image done server side for applying it to different places (forums, news pages, and such.)
Last edited by Avexrias on Mon Apr 04, 2016 8:06 pm, edited 1 time in total.

User avatar
[violet]
Executive Director
 
Posts: 16207
Founded: Antiquity

Postby [violet] » Tue Apr 05, 2016 6:33 pm

SVG would be wonderful, as it particularly suits flag-like images, but we've never been able to do it because of Internet Explorer. Even today IE/Edge have poor SVG support, being unable to scale them properly, which is essential for us.

User avatar
Avexrias
Civil Servant
 
Posts: 6
Founded: Dec 21, 2014
Ex-Nation

Postby Avexrias » Tue Apr 05, 2016 7:39 pm

No idea if the standard CSS resizing stuff can be done to them, but I could vaguely imagine adjusting the "viewport" dimensions depending on where and how it is used. This would definitely require recoding things though, and the original SVG image would likely need to either be a set original size/ratio or would need to be preprocessed on a individual basis.

I would find it very odd that Edge doesn't support SVG properly. Isn't that an HTML5 staple?

User avatar
Leppikania
Minister
 
Posts: 2332
Founded: Apr 13, 2015
Left-wing Utopia

Postby Leppikania » Tue Apr 05, 2016 7:46 pm

In the meantime, though, while those browsers become outdated, you can use SVG-to-PNG converters, many of which are online, such as this one.
INTP, -4.25 Economic Left/Right, -4.1 Social Libertarian/Authoritarian, tastes like chicken.
I do use NS stats, thank you very much.
Funny Quotes
Pie charts for industries
Request an Embassy

User avatar
Avexrias
Civil Servant
 
Posts: 6
Founded: Dec 21, 2014
Ex-Nation

Postby Avexrias » Tue Apr 05, 2016 9:09 pm

Actually just screenshotted this flag from a SVG I coded by hand via Chrome's native rendering. Pasted it in Paint, and just saved as an SVG. No issues with conversion.J ust would be sort of cool to see "crisper" or more defined flags if you roomed in on the page.

Perhaps this will be viable in the future when proper support is mostly unanimous...

User avatar
[violet]
Executive Director
 
Posts: 16207
Founded: Antiquity

Postby [violet] » Tue Apr 05, 2016 11:25 pm

Avexrias wrote:I would find it very odd that Edge doesn't support SVG properly. Isn't that an HTML5 staple?

Yes, it is. But there you go. Edge still has the IE bug where it can't scale SVG images within a fluid box, which we do often on this site.

User avatar
Linux and the X
Negotiator
 
Posts: 5487
Founded: Apr 29, 2006
Ex-Nation

Postby Linux and the X » Tue Apr 05, 2016 11:29 pm

Perhaps SVG files are small enough that they can be stored along with an auto-converted PNG version that can be fed to IE?
If you see I've made a mistake in my wording or a factual detail, telegram me and I'll fix it. I'll even give you credit for pointing it out, if you'd like.
BLUE LIVES MURDER

[violet]: Maybe we could power our new search engine from the sexual tension between you two.
Me, responding to a request to vote for a liberation: But... but that would blemish my near-perfect history of spitefully voting against anything the SC does!
Farnhamia: That is not to be taken as license to start calling people "buttmunch."

GPG key ID: A8960638 fingerprint: 2239 2687 0B50 2CEC 28F7 D950 CCD0 26FC A896 0638

they/them pronouns

User avatar
[violet]
Executive Director
 
Posts: 16207
Founded: Antiquity

Postby [violet] » Tue Apr 05, 2016 11:37 pm

At this point in my life, I am done with crafting arcane workarounds for Microsoft browsers. If Edge gets compliant and old IEs die off, I will happily add SVG support.

User avatar
The Alexanderians
Postmaster-General
 
Posts: 12581
Founded: Oct 03, 2010
Ex-Nation

Postby The Alexanderians » Tue Apr 05, 2016 11:39 pm

[violet] wrote:SVG would be wonderful, as it particularly suits flag-like images, but we've never been able to do it because of Internet Explorer. Even today IE/Edge have poor SVG support, being unable to scale them properly, which is essential for us.

Why is an outdated browser "essential"?
Galloism wrote:Or we can go with feminism doesn't exist. We all imagined it. Collectively.
You can't fight the friction
Women belong in the kitchen
Men belong in the kitchen
Everyone belongs in the kitchen
Kitchen has food
I have brought dishonor to my gaming clan
Achesia wrote:Threads like this is why I need to stop coming to NSG....

Marethian Lupanar of Teladre wrote:A bright and cheerful mountain village of chapel-goers~

The Archregimancy wrote:
Hagia Sophia is best church.

Major-Tom wrote:Why am I full of apathy?

I'm just here to be the peanut gallery
уσυ нανєи'т gσт тнє fυℓℓ єffє¢т

User avatar
[violet]
Executive Director
 
Posts: 16207
Founded: Antiquity

Postby [violet] » Tue Apr 05, 2016 11:40 pm

The Alexanderians wrote:Why is an outdated browser "essential"?

I was actually saying that being able to scale images is essential. But supporting IE and Edge is also important, because people use them.
Last edited by [violet] on Tue Apr 05, 2016 11:41 pm, edited 1 time in total.

User avatar
Zacherie
Spokesperson
 
Posts: 160
Founded: Apr 29, 2015
Iron Fist Consumerists

Postby Zacherie » Tue Apr 05, 2016 11:40 pm

The Alexanderians wrote:
[violet] wrote:SVG would be wonderful, as it particularly suits flag-like images, but we've never been able to do it because of Internet Explorer. Even today IE/Edge have poor SVG support, being unable to scale them properly, which is essential for us.

Why is an outdated browser "essential"?

Alienating any part of your userbase is generally a very poor idea.
WELCOME TO THE JUNTA BABY~!
Frisbeeteria wrote:This is spam hackery.

I'm Vleerian

User avatar
The Alexanderians
Postmaster-General
 
Posts: 12581
Founded: Oct 03, 2010
Ex-Nation

Postby The Alexanderians » Tue Apr 05, 2016 11:46 pm

[violet] wrote:
The Alexanderians wrote:Why is an outdated browser "essential"?

I was actually saying that being able to scale images is essential. But supporting IE and Edge is also important, because people use them.

Most people have moved on to Chrome, Firefow, and Safari. Why not just have a disclaimer saying something like "IE still works for the most part but some of our services re best enjoyed with these browsers [lists them here]". A lot of services suggest using one browser over another, in fact it's the whole reason I got Chrome it worked best for what I was trying to accomplish at the time.
Galloism wrote:Or we can go with feminism doesn't exist. We all imagined it. Collectively.
You can't fight the friction
Women belong in the kitchen
Men belong in the kitchen
Everyone belongs in the kitchen
Kitchen has food
I have brought dishonor to my gaming clan
Achesia wrote:Threads like this is why I need to stop coming to NSG....

Marethian Lupanar of Teladre wrote:A bright and cheerful mountain village of chapel-goers~

The Archregimancy wrote:
Hagia Sophia is best church.

Major-Tom wrote:Why am I full of apathy?

I'm just here to be the peanut gallery
уσυ нανєи'т gσт тнє fυℓℓ єffє¢т

User avatar
Avexrias
Civil Servant
 
Posts: 6
Founded: Dec 21, 2014
Ex-Nation

Postby Avexrias » Wed Apr 06, 2016 7:56 am

Yeah, only reason I brought this up was because I actually thought that SVG support was universal at this point. I knew IE always lagged behind a bit, but as this is 2016, it made little sense to me that things still worked like they did on IE6...

If this alienated people running anything older than 1-2 generations of IE and left recent IE and Edge versions alone, I'd say add it in. But as Microsoft's recent browsers cannot even do this HTML5 mandated task properly, we're still stuck. It gets put in, and everyone running a MS browser will be hosed. Edge/IE probably still make up a sizable portion of general web visits as well.

Isn't it ironic we always have to code around Internet Explorer, but yet Chrome and Firefox are mostly (but not exactly) consistent?

User avatar
[violet]
Executive Director
 
Posts: 16207
Founded: Antiquity

Postby [violet] » Wed Apr 06, 2016 8:11 pm

I would have said "excruciating" rather than "ironic," but yeah.

But at least it's better than it used to be. I no longer routinely allocate extra time to find workarounds for IE bugs. And IE/Edge usage is down around 5%.

User avatar
Avexrias
Civil Servant
 
Posts: 6
Founded: Dec 21, 2014
Ex-Nation

Postby Avexrias » Wed Apr 06, 2016 9:51 pm

[violet] wrote:I would have said "excruciating" rather than "ironic," but yeah.

But at least it's better than it used to be. I no longer routinely allocate extra time to find workarounds for IE bugs. And IE/Edge usage is down around 5%.


I actually never cared to optimize for IE, but I have smaller websites with no where near as much traffic. Look fine in Firefox and Chrome? Good to go :roll:

Thanks for taking the time to respond to this topic with a good explanation though. I usually just get told off when I inquire :P

User avatar
Alterrum
Spokesperson
 
Posts: 145
Founded: May 28, 2011
Left-Leaning College State

Postby Alterrum » Thu Mar 15, 2018 7:11 pm

Resurrecting an old thread here, but could it be reconsidered, especially as the newest versions of both IE and Edge have proper SVG support, and according to caniuse.com, 98.2% of global internet users run SVG-compliant browsers?

User avatar
Alterrum
Spokesperson
 
Posts: 145
Founded: May 28, 2011
Left-Leaning College State

Postby Alterrum » Wed Mar 21, 2018 7:19 pm

Bump

User avatar
Mingulay Isle
Attaché
 
Posts: 89
Founded: Mar 26, 2017
Ex-Nation

Postby Mingulay Isle » Wed Mar 21, 2018 8:36 pm

While I'd love any sort of support for vector graphics I have to point out that SVGs can be used maliciously; a concern if we're allowing users to upload their own.

User avatar
Alterrum
Spokesperson
 
Posts: 145
Founded: May 28, 2011
Left-Leaning College State

Postby Alterrum » Mon Mar 26, 2018 10:29 am

Mingulay Isle wrote:While I'd love any sort of support for vector graphics I have to point out that SVGs can be used maliciously; a concern if we're allowing users to upload their own.


This goes over my head, but is it not possible to mitigate those dangers? I've noticed SVGs on Wikipedia, which presumably allows its users to upload them.

User avatar
Mingulay Isle
Attaché
 
Posts: 89
Founded: Mar 26, 2017
Ex-Nation

Postby Mingulay Isle » Mon Mar 26, 2018 11:45 am

Alterrum wrote:
Mingulay Isle wrote:While I'd love any sort of support for vector graphics I have to point out that SVGs can be used maliciously; a concern if we're allowing users to upload their own.


This goes over my head, but is it not possible to mitigate those dangers? I've noticed SVGs on Wikipedia, which presumably allows its users to upload them.

As I understand it the risk comes from the fact that SVGs can make use of javascript, so preventing users uploading files with embedded javascript might be a solution.
I don't know the whole story, only that finding a secure way to allow SVG uploads was a stumbling block for a site I'm involved in.
Last edited by Mingulay Isle on Mon Mar 26, 2018 11:48 am, edited 1 time in total.


Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Aelyria, Bisofeyr, Geopolity, Konges, Radicalania, Thal Dorthat

Advertisement

Remove ads