Giter Site home page Giter Site logo

jakegiltsoff / svgontheweb Goto Github PK

View Code? Open in Web Editor NEW
200.0 200.0 38.0 258 KB

Techniques you can use to prepare, implement, and work with SVGs on the web.

Home Page: https://svgontheweb.com/

License: Other

CSS 36.98% HTML 62.81% JavaScript 0.20%

svgontheweb's People

Contributors

brianmontanaweb avatar calinou avatar chrisivens avatar jakegiltsoff avatar janily avatar meritt avatar premasagar avatar sujinleeme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

svgontheweb's Issues

Multilingual translation

hi jake
I really like this project.
I want to translate a Chinese version.
Could you add a Chinese version?
Thanks.

A tip for the JS Manipulation code

I think it must be explained why to use window.onload=function(), not extended, just a mention why we need the object loaded. In this code the "object" will be useful only inside window.onload=function() so other functions outside this scope can't access the object. The solution for me was just declare variables outside window.onload=function() in this way other functions can use this object to manipulate the SVG.

Imprecision or error re: <object>?

Hi Jake. Thanks for a great resource. ๐Ÿ‘

The page currently reads:

<object> is pretty much the best option to use if you want to be able to manipulate an SVG.

I'm not sure what you mean by that. The phrase "manipulate an SVG" suggests manipulating the SVG dom or styles from outside the SVG file itself (mostly from the host page, or related stylesheets and scripts). But in my testing there is no need in either Chrome or Firefox to style or access the SVGโ€˜s elements.

This works for Inline SVGs, and for <svg><use xlink:href="external.svg#symbol-id"></svg>:

object, svg {
    fill: red;
    stroke: lime;
    stroke-width: 5px;
}

Additionnally for external SVG symbols, this would work in Firefox, but it's considered a bug:

svg path {
    fill: lime;
}

Returning to <object>, this doesn't work either:

document.querySelector('object.bb-logo-example svg'); // null
document.querySelector('object.bb-logo-example path'); // null

Did you mean that <object> is an interesting option because, unlike the <img> tag, it allows the SVG file to run scripts (embedded inside the file) and reference external scripts and stylesheets? (Note I'm not 100 percent sure of which browsers allow what.)
If yes, what would be the differences between using <object> for that, and using <iframe>?

svgontheweb.com is down

svgontheweb.com is currently down. If I accept the invalid SSL certificate, the browser will abort the page loading as it will become stuck in a redirect loop.

wget log
โฏ wget --no-check-certificate https://svgontheweb.com
--2018-07-13 16:27:06--  https://svgontheweb.com/
Resolving svgontheweb.com (svgontheweb.com)... 205.186.179.200
Connecting to svgontheweb.com (svgontheweb.com)|205.186.179.200|:443... connected.
WARNING: no certificate subject alternative name matches
        requested host name 'svgontheweb.com'.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:06--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:06--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:06--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:07--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:07--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:07--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:07--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:07--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:07--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:07--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:08--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:08--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:08--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:08--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:08--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:08--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:08--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:09--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:09--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
--2018-07-13 16:27:09--  https://svgontheweb.com/
Reusing existing connection to svgontheweb.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://svgontheweb.com/ [following]
20 redirections exceeded.

French translation

Is there anyone working on a French translation? If not, this is something I can tackle.

Browser support

Is there no info about browser support? I saw one note about Safari but nothing that most animations do not work on IE (have not checked Edge). Could you add something about this? Thanks!

How about combining?

Hello,

Would be awesome if you could cover the best practices for svg combining. It looks like it is possible to combine multiples svg into one, and to query them this way:

  • my-combined-svg#my-id

I'm wondering if this is possible to do everything this way like on a regular svg, and if there's any downside people might need to know if choosing such a method. Combining could also make it possible to compile like we're doing with js and css assets. Being able to declare many svg when developing, and compile to only one sounds cool :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.