HKayn / rwarframe-stylesheet-bundler

Bundle CSS stylesheets for the r/Warframe subreddit family.
0 stars 0 forks source link

To-Do Help #1

Open dhkatz opened 1 year ago

dhkatz commented 1 year ago

Hello!

I randomly came across this repo when I was working on updating an old subreddit repo and noticed you had a To-Do list of things we already solved.

I used to work on the r/Paragon, r/Fortnite, and r/FortniteBR subreddits so I learned a lot about automating stylesheets. You can view some of that work here: https://github.com/dhkatz/paragon-subreddit

We used browser-sync for development, it is really cool and lets you preview changes to the stylesheet locally.

GitHub actions are being used to test builds and for publishing the stylesheet. Right now it automatically publishes the stylesheet and all referenced images when a new tag is pushed to the repo.

HKayn commented 1 year ago

Hi, thanks for pointing me to your repo! I will definitely be studying it over the coming days and taking note of the tools used. browser-sync looks especially promising!

Does your project also validate the stylesheet, i.e. check whether it's too large in size or using CSS properties that Reddit doesn't support?

dhkatz commented 1 year ago

I have not considered validating the stylesheet but that's something I could probably do relatively easily. Let me look into it

dhkatz commented 1 year ago

Ok I think using css-tree I can replicate Reddit's own cssfilter.py file within JavaScript pretty easily

Edit: Alright I actually wrote the beginning of a validator in JS, you can see it on the repo now. It is more of a proof of concept and I'm already writing it again to be in line with Reddit's.

It won't be an exact 1 to 1 in terms of code, but I'm going to make sure it passes all the same tests they have.