User generated custom css

前端 未结 4 2023
忘掉有多难
忘掉有多难 2021-01-06 21:36

Hey, anyone have any idea what the best way to allow users to save custom css would be? Specifically, there are about 4 color values that I would like to allow a user to ch

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-06 22:33

    I think that best way is to save it to Db, because you don't want to allow user to mess with your website. At least if some pages are public.

    And I personally think that answers like "do it without JavaScript" is nothing but old school BS... Did they tried to turn of JavaScript today? I don't think so... And by this paragraph I don't mean that you have to do it using JavaScript. Do it in a way that suits your needs

提交回复
热议问题