html5 - Designing entire webpages as SVG files -
disclaimer
i realize given absurdity of title, sounds troll. however, it's genuine question. background involves opengl / x86 assembly. i've started learning web programming. svg + css, , wondering -- why people not design entire webpages in svg?
context
- svg provides beautiful primitive: quadratic + cubic bezier curves; lines + filling -- vector graphics
- svg provides text
- svg provides affine transformations
questions
- are there examples of people designing entire websites giant svg file?
- if not, limitations?
- are there performance hits when using svg primitives opposed divs/tables?
it possible; example can embed html fragments in svg documents in order things hyperlinks.
however, there significant disadvantages, @ least @ present:
- current web browsers treat svgs images, , may not present ui users. example, think firefox doesn't allow user select text in svg files.
- you lose separation of content , presentation. while svg use css, , can in principle maintain separation if edit hand, designing layout content. has several drawbacks:
- as corollary, it's harder adapt resulting page other formats. particularly:
- what's behavior when text size changed? document printed? window resized? it's hard design complex drawing supports reflow nicely (and if drawing isn't complex, may use html+css).
- screen reader support: since order not clear (below), screen readers may give incomprehensible, scrambled output. more basically, screen readers may assume svg image , not try read text.
- svg exclusively based on xml, , hence requires pretty strict adherence rules. (x)html, have option of using plain html serialization. many of these rules relaxed, , browsers more robust if feed them bogus input (as opposed
xml parsing errorif have single misplaced>). current search engines won't index pages (they'll treat them monolithic images).never mind- order of content not clear. tools inkscape don't need care order elements output in, long positioned correctly in output , z-order correct. if you're making web page, matter, because screen readers don't know sure element semantically first. isn't issue if you're editing svg hand, usual svg tools may scramble order. html, it's clear.
it's difficult implement fragment identifiers ((i'm not sure one) *̶ ̶i̶t̶'̶s̶ ̶d̶i̶f̶f̶i̶c̶u̶l̶t̶ ̶t̶o̶ ̶c̶o̶n̶v̶e̶r̶t̶ ̶t̶o̶ ̶t̶e̶x̶t̶ ̶(̶f̶o̶r̶ ̶s̶e̶a̶r̶c̶h̶ ̶e̶n̶g̶i̶n̶e̶s̶,̶ ̶s̶c̶r̶e̶e̶n̶ ̶r̶e̶a̶d̶e̶r̶s̶,̶ ̶c̶o̶p̶y̶-̶a̶n̶d̶-̶p̶a̶s̶t̶e̶,̶ ̶e̶t̶c̶.̶)̶,̶ ̶p̶a̶r̶t̶i̶c̶u̶l̶a̶r̶l̶y̶ ̶w̶h̶e̶n̶ ̶g̶e̶n̶e̶r̶a̶t̶e̶d̶ ̶w̶i̶t̶h̶ ̶g̶r̶a̶p̶h̶i̶c̶a̶l̶ ̶t̶o̶o̶l̶s̶.̶ ̶f̶o̶r̶ ̶e̶x̶a̶m̶p̶l̶e̶,̶ ̶h̶t̶t̶p̶:̶/̶/̶w̶w̶w̶.̶a̶f̶r̶o̶k̶a̶d̶a̶n̶s̶.̶c̶o̶m̶/̶p̶a̶g̶e̶_̶0̶1̶.̶s̶v̶g̶ ̶s̶h̶o̶w̶s̶ ̶u̶p̶ ̶i̶n̶ ̶g̶o̶o̶g̶l̶e̶ ̶a̶s̶ ̶#id_of_some_element@ end of url) well. presentation program below uses them, think depends on javascript (bad search engines , people javascript disabled).̶d̶a̶n̶s̶e̶ ̶e̶t̶ ̶m̶i̶s̶e̶ ̶e̶n̶ ̶f̶o̶r̶m̶e̶ ̶b̶i̶e̶n̶v̶e̶n̶u̶e̶ ̶d̶ ̶a̶ ̶n̶ ̶s̶ ̶e̶ ̶r̶ ̶p̶o̶ ̶u̶ ̶r̶ ̶c̶é̶ ̶l̶ ̶é̶b̶ ̶r̶ ̶e̶ ̶r̶ ̶l̶ ̶a̶ ̶v̶ ̶i̶e̶.̶ ̶e̶ ̶n̶ ̶v̶e̶ ̶l̶ ̶o̶p̶p̶ ̶é̶ ̶e̶ ̶d̶ ̶e̶ ̶t̶ ̶a̶ ̶m̶ ̶b̶ ̶o̶ ̶u̶r̶ ̶s̶ ̶i̶n̶ ̶d̶o̶ ̶c̶ ̶i̶l̶ ̶e̶ ̶s̶ ̶e̶ ̶t̶ ̶i̶ ̶n̶ ̶c̶e̶ ̶s̶s̶ ̶a̶ ̶n̶t̶s̶̶.̶ ̶i̶n̶ ̶c̶o̶n̶t̶r̶a̶s̶t̶,̶ ̶e̶v̶e̶n̶ ̶c̶r̶a̶p̶p̶y̶ ̶w̶y̶s̶i̶w̶y̶g̶ ̶h̶t̶m̶l̶ ̶g̶e̶n̶e̶r̶a̶t̶o̶r̶s̶ ̶w̶o̶n̶'̶t̶ ̶s̶p̶l̶i̶t̶ ̶u̶p̶ ̶r̶u̶n̶s̶ ̶o̶f̶ ̶t̶e̶x̶t̶ ̶l̶i̶k̶e̶ ̶t̶h̶a̶t̶.̶
something consider is possible embed svg elements in xhtml , html 5, of benefits without throwing off browsers/search engines.
existing usage
i've heard of use presentations (which closer drawings in respects, of above drawbacks don't apply):
Comments
Post a Comment