emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs design and architecture


From: Max Brieiev
Subject: Re: Emacs design and architecture
Date: Fri, 15 Sep 2023 10:23:21 +0300
User-agent: Gnus/5.13 (Gnus v5.13)

Yuri Khan <yuri.v.khan@gmail.com> writes:

> On Fri, 15 Sept 2023 at 12:51, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> One of the important aspects to keep in mind in this regard is that
>> Emacs must give Lisp programs dynamic control of how stuff is
>> displayed, and should be able to exercise that control at high
>> frequency (a trivial example: pulse.el).
>
> In CSS, this is solved in core with transitions. A style specifies
> that a certain property will change gradually, provides its target
> value, the transition duration, and a transition curve. The styling
> engine does all the work about calculating the intermediate values and
> re-layouting each intermediate frame; the page author does not have to
> script carefully timed property changes, and is in fact discouraged
> from doing so because doing that in Javascript incurs CPU and battery
> usage overhead.
>
> The use case of pulse.el would be translated to a couple of styles
> that say effectively “A pulsed span will instantly gain yellow
> background” and “A non-pulsed span will linearly revert to whatever
> background it had over the course of 200 milliseconds” and a small
> function that sets the span to pulsed and then immediately to
> non-pulsed.
>
> (Implementing a CSS engine over a character terminal is a nontrivial
> matter though.)

CSS is tricky and very hard to get right. This is the reason CSS
frameworks like Tailwind or Bootstrap exist.

I think building user interfaces with SVG is more plausible. It is the
same DOM model, it is reactive, and its display is very consistent
(unlike HTML/CSS combo).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]