w0rm / gulp-svgstore

Combine svg files into one with symbol elements
https://www.npmjs.com/package/gulp-svgstore
645 stars 33 forks source link

<div style="height: 0; width: 0; position: absolute; visibility: hidden"> create a white box at the bottom of the page #74

Closed dannypk closed 7 years ago

dannypk commented 8 years ago

If I put top:0 manually, it disappears. Otherwise, I have an extra white box at the bottom of the page. Any idea why ? It's both firefox/chrome mobile/desktop view. Thanks

w0rm commented 8 years ago

@dannypk I guess it is because an svg inside the div has bigger dimensions. Setting width and height on the div doesn't hide the overflowing content

w0rm commented 8 years ago

You may try to either apply the style on the svg itself, or set overflow:hidden. The idea is to have svg visually hidden, because simply setting display:none may break svg content (like gradients) in some browsers.

w0rm commented 7 years ago

Alternatively, you may use visuallyhidden from html5 boilerplate,

https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css#L128

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap;
}
10n37 commented 3 years ago

@w0rm it doesnt work normally with tables... Screenshot_1