Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I never said you couldn't do it, you just can't do it the way you prefer:

parent {}

child{ margin-left: auto; margin-right: auto; width: 100px; }



My question is simply, what's the reasoning behind my inability to type:

  child{ center: horizontal; }
That would be very newcomer-friendly. Possibly naive, but I'm interested to know why.


1. center to what?

1a. child is 0px wide.

2. semantics: You're basically saying "Why isn't language x exactly like language y/how I want it to be?"

3. margin is what you're adjusting, so saying margin-auto makes sense.

4. Layers and layering are an important aspect of CSS, you've just broken all of them.


This is what comes to mind to me, a CSS ignorant:

1. To the parent, the width of which is known by the layout code of the browser at any moment at 'runtime'.

1a. Fair enough, then it won't show up. But it will not-be-there centered, goddammit!! >:)

2. Which is a very fair question, and how languages get better.

3. That is one way to look at it, the one the language seems to force into you, and apparently it's the least intuitive.

4. If you can get an exactly equivalent effect with other expression, how come you can't have "center horizontally" just become an alias/shortcut/abstraction for that, if newbies expect it?

Then again, this is only an issue for hand-coded CSS. If you use your HTML/CSS as object code, this is easy enough to abstract in your generating code.


If you use your HTML/CSS as object code, this is easy enough to abstract in your generating code.

Bingo! And that's one reason Arc is pretty exciting. I'll be able to do the equivalent of center: horizontal, and the details can be abstracted.


What makes you think Arc will improve on other Lisps in this respect?


Hype.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: