codethesaurus / codethesaur.us

A polyglot developer reference tool to compare programming language concepts side-by-side! Great for learning new languages or using for reference.
https://codethesaur.us
GNU Affero General Public License v3.0
286 stars 164 forks source link

CSS 3 #571

Open xomiamoore opened 1 year ago

xomiamoore commented 1 year ago

Language you would like added

CSS 3

Information on the language

CSS is a cornerstone language for frontend and is currently missing in Code Thesaurus. I would like to add CSS 3 (and previous versions, if you think that would be useful).

I looked and didn't see previous discussion on including HTML and CSS, so I wasn't sure if there was a specific reason they aren't already included. My concern was that I am not sure if they will fit easily into the current organization of Language Concepts.

Let me know your thoughts, would love to dive in on this (and HTML as well).

geekygirlsarah commented 1 year ago

HTML, as a markup language, doesn't really have concepts like functions, loops, and things like that, so it's not really fit in here. There also aren't similar languages that do the same thing. (Like there's no in Firefox but in Chrome or something.) So the "code" and "thesaurus" part of Code Thesaurus doesn't really work for HTML.

For CSS1, it's kind of the same boat, very static, one of a kind, and no programming concepts in it. But newer CSSs do have concepts like looping/functions/variables and such (if I recall correctly) and very well could be added into CT. Just no one's done it yet! I'm definitely not opposed to it!

xomiamoore commented 1 year ago

Yeah, I totally understand why HTML is not a good fit with the "thesaurus" part.

I was digging into the docs and saw this:

Some languages are easy to compare (like C++, Java, C#) and others that aren't (like Haskell, Perl, APL, Whitespace, LOLCODE)

And it made me wonder about including the hard-to-compare languages as a reference sheet, but not in the drop-down list for comparisons. Like you said, CSS 3 has many of these concepts, so it could fit with the current project architecture, but it doesn't necessarily make sense to compare it to another language.

This is a larger discussion than just adding CSS 3, but what do you think? Does that align with your goals for this project? Totally fine if not and the "thesaurus" part is the core vs. the reference sheets! :)

geekygirlsarah commented 1 year ago

I'm quickly looking up how to do some things in CSS3 and finding there isn't a lot. Like there's math operators (+, -, max(), min(), etc.) and things like kind of if statements (they're not "if this then..." but more like "@media all and (max-width: 900px)" and things like additional logic ("menu a:not(#current)"). So some things can be added. But there's not things like memory management, custom functions, etc.

However, there's Less and Sass and some of the precompilers that DO have more of this stuff. Again they won't have the language stuff in them. But I absolutely do think a "I know how to write a python function, how do I write a similar function in Sass?" is a very likely thing someone could want to look up, and could.

(I have ideas for other things to compare in the future that go outside of just programming language concepts. Like SQL/NoSQL variations for example. One that I did think would be CSS vs Sass vs Less vs whatever else is out there. That's a much larger scale to think about as it'd need newer infrastructure to support it, but if that's a thing you're interested in, we could talk it over too.)

xomiamoore commented 1 year ago

Awesome, I think this could be a good feature later on. I'm glad to have started the discussion because all this sounds really useful!

But, like you said, this is quickly becoming larger than the initial issue. I don't think I have the bandwidth (or skill, lol) to work through these larger questions myself.

Should we reorganize this to another issue about adding other types of comparisons? Or do you want to edit this one to encompass that instead of adding CSS 3? 🤔

geekygirlsarah commented 1 year ago

The larger-scale comparing CSSy stuff is more of a future thing. (I have a bunch: https://github.com/orgs/codethesaurus/projects?type=classic ). I added those in here. But those projects are ones that would require me to do some architecture work on them and are very large. We can just kind of leave tehat there for now...

If you know where current CSS and/or Sass and/or Less and/or whatever else can fit into what's there now, it can totally be added now! Just let me know what you want to do. Adding new languages is as easy as adding a new /web/thesauruses/[lang]/[ver] directory and modify /web/thesauruses/meta_info.json and add a language in there.

geekygirlsarah commented 1 year ago

SO... do you want to add CSS3 to CT?

xomiamoore commented 1 year ago

I'm gonna take a look this weekend and see! Sorry for the delay @geekygirlsarah :)

geekygirlsarah commented 1 year ago

That's fine. I'll assign you! Let me know if you have any questions. There's also docs that shows how to add a new language too!

github-actions[bot] commented 1 year ago

This issue has been inactive for 346 hours (14.42 days) and will be unassigned after 62 more hours (2.58 days). If you have questions, please leave a comment, message @codethesaurus or @geekygirlsarah on Twitter, or email coreteam@codethesaur.us.If you are still working on this issue, that's fine. Please comment here to tell the bot to give you more time.

github-actions[bot] commented 1 year ago

This issue has been inactive for 418 hours (17.42 days) and is past the limit of 408 hours (17.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you for your interest in contributing to this project.