Comments (18)
Here's the same code block in both themes. Legend:
- Primary link (
define-configuration
): macro, special syntax, referenciable and inspectable inside Nyxt, hard to change. - Regular link (
make-keymap
): function, class, or any other "normal" program entity. Referenciable, inspectable, easy to change. - Action color, no link (
let
): special built-in form. Not inspectable, unchangeable.
(Wow, I haven't ran latest Nyxt for some time, light theme codeblock color looks SLEEEEEK π€©)
from nyxt.
from nyxt.
I think that the only important aspect is that Nyxt's default themes need to be made properly. Custom themes are the the author's responsibility and they may not follow the contrast directives we follow.
As a sidenote, I think we should not reference "Modus themes" in our sources. Generally speaking, any reference to external projects is not desirable (including emacs, vi, etc). Nyxt is not an imitation project and should not stay in the shadow of others. It's not VI that invented modal editing. And it's not the Modus themes that came up with the idea of ensuring contrast ratios for readability.
from nyxt.
I think that the only important aspect is that Nyxt's default themes need to be made properly. Custom themes are the the author's responsibility and they may not follow the contrast directives we follow.
No. The whole point of theming is that we provide a set of APIs conforming to which one can make a pretty theme equal to built-in ones. Yes, if someone injects custom CSS extending the theme beyond our APIsβit's their own problem. But all the otherwise, all themes should be born equal.
And note that it's not (only) about contrast anymore: contrast is ensured automatically. It's about semantics of themes and making themes understandable and reproducible by anyone.
Generally speaking, any reference to external projects is not desirable (including emacs, vi, etc).
A counter-example: we mention Google, Pypi, DOI, DuckDuckGo already. Quite explicitly, in the manual. How is Modus theme different? Note that Solarized (!) is a project too. And Darkula. And Monokai. Most themes are separate external projects, so you can't make an omelette without breaking eggs make theming without mentioning themes.
And it's not the Modus themes that came up with the idea of ensuring contrast ratios for readability.
I'm not mentioning that anywhere.
from nyxt.
And then, this issue also influences built-in themes, and will likely influence themes that @lansingthomas is baking. So we have to address it universally, whatever the support status for external themes.
from nyxt.
Most themes are separate external projects, so you can't
make an omelette without breaking eggsmake theming without mentioning themes.
A theme can be made without mentioning others. Just like Coca-cola doesn't mention Pepsi, even though both are colas.
from nyxt.
Would more text colors help?
Something like:
text: code-alt
text: code-symbol
text: code-extra
text: code-fun
text: code-parens
It is kind of cool to be able to set your own code colors
from nyxt.
from nyxt.
I don't think I understand the proposal.
What parts am I missing?
Let me try to list the elements of a code block in default state in Nyxt, and @aartaka maybe you can fill in the missing parts.
codeblock text
;
- text color {
text
from the text colors palette} - text size and style {from the typography guideline}
- background color {
codeblock
from surface colors palette} - background size and shape {we have not established an explicit convention for this yet}
- ????? help
from nyxt.
The more I reflect on this the more I want to try some more colors for the built in operators and the symbols. Our palette is SOOOO minimal already.
@aartaka can you send me a nice code example snippet with all the elements?
from nyxt.
record of a conversation:
Artyom and Tom spoke about code block styling, and considered three options moving forward to help differentiate typographic code elements like special forms
, code macros
, ... perhaps even things like functions
, conditionals
, objects from other languages.
Proposal 1 - rely on text decoration like bolding and underlining
- works great for some themes, a good option in some cases.
- insufficient for certain themes {low saturation, bright text etc.}
Proposal 2 - use existing surface colors as text colors in these special cases
- we experimented with the color combinations that appeared promising and found the combinations to be poor. {contrast test failures, poor readability, crappy aesthetics}
- this method also feels inconsistent... using surface colors for text... YES it happens in some other places like buttons in certain states... we risk some really bad looking code editing situations.
Proposal 3 -- add some more text-colors
- the downside: more objects to manage.
- the upside: more user freedom when creating custom themes (or editing existing themes)
- more colooooors! ππππππππ
We settled on proposal 3.
experiments are ongoing.
from nyxt.
Would these styling groups be acceptable?
(to add to the text color category -- which currently has: text
, text+
, text-
, and constrast-text
literals
(things that eval to themselves)macros
(incl. functions)special forms
keyword-arguments
(symbols in the keyword package)comments
(;)
from nyxt.
@aartaka I know we talked about accommodating other languages in the structure-
- I am deciding NOT to worry about this at the moment, the simplest system I could find that does this uses (23 variables) x (10 modifiers) ... which is well beyond our scope for now. ^^
from nyxt.
from nyxt.
Even thinking about that fills me with horror.
yes run! Flee while you can.
(1) regular code/symbols/functions/variables/etc. (you haven't mentioned this one, is it implied?...)
yes, text
covers this for now
from nyxt.
I think having literals
and keyword-arguments
as one item makes sense
from nyxt.
I keep running up against the limit of my knowledge here.
@jmercouris
Can you help us group this dumb word salad into a coherent structure?
from nyxt.
Related Issues (20)
- Playback in twitch starts to lag after few minutes HOT 2
- vi mode: Need to switch to insert mode after using `follow-hint` key binding HOT 3
- vi mode: Can't unfocus text input on website HOT 3
- Restart prompting -- When you just need to start over HOT 6
- duplicate suggestions in DESCRIBE SLOT HOT 2
- Nyxt uses about 40% of a CPU when idling HOT 13
- Freezes when entering URL HOT 5
- special case UI for mode specific commands HOT 6
- `switch-buffer` UI may be misleading HOT 15
- execute-command: Suggested Lisp expression without brackets until typed completely HOT 1
- Nyxt opens as a blank window HOT 1
- `bookmark-url` is broken HOT 2
- `common-settings` bug
- `common-settings` improvements HOT 6
- Update web engine to support modern websites HOT 3
- Error using KeePassXC integration (couldn't execute "clip") HOT 8
- Unable to run Nyxt HOT 10
- `edit-with-external-editor` is broken HOT 1
- Unable to use `edit-with-external-editor`with flatpak apps HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nyxt.