-2

I need assistance changing the global borders width on my site. In the Chrome Developer, I am able to achieve this successfully. I need to change the width from 1 to 0.5. I've located the global borders in the css panel (settings.data.json).

JSON isn't accepting the decimal in the 0.5 width. I tried 0,5 and that also doesn't work. Is there another way I can easily achieve this

{
    "type": "range",
    "label": "Width",
    "id": "globalBorderWidth",
    "min": 1,
    "max": 3,
    "step": 1,
    "unit": "px",
    "default": 1
  }

I've tried to change the "min" and "default" to 0.5 , 0,5 , and "0.5" and keep receiving an error that the JSON file can not be saved.

Error code

Rob
  • 14,746
  • 28
  • 47
  • 65
Jhoxo
  • 1
  • 1
  • 2
    Try using a string, e.g. `"0.5"` - but it depends on how the JSON is being processed by Shopify, because JSON _does_ support JSON `number` literals including floating-point values - but it's Shopify that's refusing to accept that. https://stackoverflow.com/questions/19554972/json-standard-floating-point-numbers – Dai Sep 02 '23 at 20:45
  • Please screenshot the error, I see too many options caused by different things – Dimava Sep 02 '23 at 20:49
  • @Dai I just tried "0.5" and it is also being rejected. Thank you for your help! – Jhoxo Sep 02 '23 at 21:05
  • @Dimava Hi there, I've added the screen shot to the post. Thank you for looking into this. – Jhoxo Sep 02 '23 at 21:08
  • It should be `{ "min" : 0.5 }` if that doesn't work but e.g. `1.0` does that means it expects integers. Try `1.0` (no quotes) and then `0.5` – Dimava Sep 02 '23 at 21:38

0 Answers0