Welcome to TalkGraphics.com
Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,805

    Default Re: When all else fails: Tiling Backgrounds for Dummies

    Quote Originally Posted by gwpriester View Post
    I noticed something while playing with the other Gary's code, the second number does not appear to do anything; delete it and everything still works; and it you end the number with a coma instead of a semi-colon this small change changes the size of the repeating pattern.
    Size isn't everything!

    If you have a large SVG then background-size: auto auto; returns it in its intrinsic dimensions.
    If you omit the second auto, auto is assumed.
    So if you just set (15px) you are actually telling it (15px auto); the auto here is saying use the intrinsic ratio to calculate the height given the dimensioned width..
    A comma is to separate adjacent SVGs that are being rendered together so (15px, 15px) is actually ((15px auto), (15px auto)) & if there actually is no second SVG the second pair is dropped.

    Other Gary has changed his code to (0.78125vw), which is (0.78125vw, auto) or (0.78125vw, 0.78125vw). 'vw' is viewport width and a value of 100 would be "fit to the width of the browser". This strange value is actually saying repeat across the browser 128 times. If you drag the browser wider, you still get all 128 boxes, only bigger.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  2. #12
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,498

    Default Re: When all else fails: Tiling Backgrounds for Dummies

    I noticed today, and maybe I am slow — it's probably been around for some time — that when previewing my sample page, Ctrl + scrollwheel zooms in and out and Firefox shows the percent of zoom in the address bar, which is useful for returning to the actual size.

  3. #13
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,805

    Default Re: When all else fails: Tiling Backgrounds for Dummies

    Quote Originally Posted by gwpriester View Post
    I noticed today, and maybe I am slow — it's probably been around for some time — that when previewing my sample page, Ctrl + scrollwheel zooms in and out and Firefox shows the percent of zoom in the address bar, which is useful for returning to the actual size.
    Gary, all my browsers have this and a Reset which I have put to 120%as my default. I zoom all the time.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  4. #14
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,498

    Default Re: When all else fails: Tiling Backgrounds for Dummies

    As I said, I'm slow. Comes when you are considered to be "elderly."

    Did you see my attempt http://gwpriester.xara.hosting/tiling-svg-background/

  5. #15
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,805

    Default Re: When all else fails: Tiling Backgrounds for Dummies

    Quote Originally Posted by gwpriester View Post
    Gary, I did.
    Sharp at 510% with no visible joins.

    On the clipping, I did mention a clip and then a second Bitmap copy.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  6. #16
    Join Date
    Apr 2018
    Location
    Barnes, London
    Posts
    952

    Default Re: When all else fails: Tiling Backgrounds for Dummies

    Thanks for sharing Acorn,

    https://initiostar.co.uk/demo/svgBg/

    OK 100/128 is 0.78125 - made me think! Interesting effect - the background now scales with Scale-to-it-Width, but maybe not uniformly? The effect gets a bit lost with the mobile variant, but works. I am guessing you could use @media rules to have a different scale on a mobile device?

    Using background-size 15px worked OK across both variants too.

    Thanks for the ideas.

    Gary

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •