Related UI elements should not appear unrelated
rakhim.exotext.com4 pointsby roryokane0 comments
- Djot requires
- writing nested lists
- with blank lines in between
- successive list items at the same level
- can skip the blank line
- but not this list item
Yes, supporting indented list items without blank lines in between would make Djot’s parser more complicated. But I write nested lists all the time in my notes, and extra blank lines would distract from the content. For me, it’s not worth it to make my raw text ugly just to make the file easier to parse. <<<<<<< left
||||||| base
def calculate(x):
a = x * 2
b = a + 1
return b
=======
def calculate(x):
a = x * 2
logger.debug(f"a={a}")
b = a + 1
return b
>>>>>>> right
With this configuration, a developer reading the raw conflict markers could infer the same information provided by Manyana’s conflict markers: that the right side added the logging line. function Button({ children }) {
return (
<button
className="inline-flex items-center gap-2 px-4 py-2 rounded-full
border border-gray-300 bg-white text-gray-900
hover:bg-gray-50 focus:ring-2 focus:ring-blue-500"
>
{children}
</button>
);
}
// Usage:
<Button>Save</Button>
This would counter all of the article’s arguments in favor of pure CSS. If the website used a `Button` component like this, it would also be true that the “HTML stays readable”, that “changes cascade”, that “variants compose”, and that “media queries live with components”.