-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update water.css and fix code output #185
Conversation
Nice! The only thing would be that we should create a specific class if we want to use |
I do not see what has changed I suspect it might be different on different OSes, can we add screenshots of before and after? In particular on my side I still see the back tick content with a bigger font than the rest of the text as before (which is not what I see in water.css page). What was the change that |
Oh, the bigger font size is because of normalize.css still being used. The samp previously just looked like a inlined backticked string spanning multiple lines (ugly). Now it takes up the full width of the page. |
Ah I see about the samp. Would it make sense instead to wrap it in a pre block? |
Mmh actually I see it is already wrapped in a pre block with class nb-output. I guess that did not solve it? I actually never noticed this issue about the samp. |
mmh, actually reading about samp I see it is supposed to be an inline element. I guess we could skip the |
On Linux, if I change only the water.css, I get an horrible code output.
I am no CSS expert, but I guess we can wrap output both by samp and pre ?
Is the display: block trick not functioning on your end?
Le lun. 6 mars 2023 à 09:06, Pietro Peterlongo ***@***.***> a
écrit :
… mmh, actually reading about samp
<https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp?retiredLocale=it>
I see it is supposed to be an inline element. I guess we could skip the
samp and wrap only in pre?
—
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANDHQOCL37YT63EVIJXV3K3W2WLJ7ANCNFSM6AAAAAAVQJJBWY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
It's because it hasn't been a problem until now that water.css has added a background to the samp. We just couldn't see that it wasn't a block before.
If we want to have a background color (that is what water.css added), we will have to put the background on the
If it works without the
That is what we are currently doing. But as water.css only styles the This is the water.css's CSS for samp {
background: #efefef;
background: var(--background);
color: #000;
color: var(--code);
padding: 2.5px 5px;
border-radius: 6px;
font-size: 1em;
} I would say that we take these attributes and inserts them into our What do you both think? |
Yep option 2 has my vote too (if it works). Thanks for the explanation Hugo. To be honest not sure if we want to add a background or we keep it white. Screenshots with options would help pick. |
Compared to the others, I actually think the current style without any background looks pretty bad 😅 |
I don't know. What I am not too fond about the versions with background is that output and code seem two separate elements. An old issue which is relevant is #65. There I linked a deep note example where the link between output and code is made visible through a light border. |
I agree with that. Hence my conceptual suggestion.
Ohhh, had completely forgot about that one :o Here's a quick version of it hacked together: The background color of the code is almost too light now. It's hard to see the difference between the white and gray. |
@dlesnoff sorry for going off-topic and discussing other stuff here as well. For this PR I think it would suffice if you remove the |
In which file do you add samp to the output?
Le jeu. 9 mars 2023, 07:44, Hugo Granström ***@***.***> a
écrit :
… @dlesnoff <https://github.com/dlesnoff> sorry for going off-topic and
discussing other stuff here as well. For this PR I think it would suffice
if you remove the samp tag from the output (and the style we added for
it) and then we'll merge this and continue with redesigning it in a
separate PR.
—
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANDHQOE6YVD23CHKPY2VBUTW3F35HANCNFSM6AAAAAAVQJJBWY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Line 20 in doc.partials["nbCodeOutput"] = """{{#output}}<pre class="nb-output"><samp>{{output}}</samp></pre>{{/output}}""" |
I made the changes. I really like the one with a thick border, but it would help to see in context: what if the code is particularly large (and the border goes off-screen)? what if there are numerous code blocks? |
Ah right, we have to fix the tests now that we have changed the produced HTML. In |
And yes we need view the redesigned code blocks in a larger context before deciding the final design. I think something in-between the light and dark borders would be nice. |
thanks @dlesnoff for working on this and sorry for all the noise in the discussion! I am fine with the current changes but noticed a couple of things:
|
We updated Water.css precisely because it solved #184 and reduced the padding of inline code blocks? 😛 In combination with removing normalize.css that is, but seems like we haven't done that here. I thought we did it, must be misremembering 🤔 So that's another thing that has to be done in this PR. |
So the remaining things TODO in this PR are:
|
I do not mind. It seemed to me related to the PR. |
Thanks a lot, it looks good to me now and the preview looks nice again :D |
J'ai testé: code {
font-size: 1em;
} et code {
font-size: 2em;
} ainsi qu'inherit. |
Thank god for Google Translate 😅 (easy mistake to do when you forget to context switch :)) Indeed, we should add a new class that we put on the |
My train arrived at destination at that time, sorry for the language mixup. I am copy-pasting the original message above with the correct translation (and a few addition): Previous messageI have tested the following css snippets: code {
font-size: 1em;
} and code {
font-size: 2em;
} as well as inherit as a value of What is the name of the partial corresponding to code blocks ? |
No worries :) It's on the line above the partial of the code output if I recall correctly. |
Btw we should also remove the |
The normal text and the code uses different fonts with slightly different sizes. So even if both a |
It differs between two Linux devices. I don't see the same on my PC (Archlinux) and my laptop (Ubuntu). Using Firefox on both! |
😅 Might the screen size play into it perhaps? Maybe the normal text is defined in pixels while the code is in relative units. I haven't been able to find the text size of the normal text in the inspector :/ |
No wait. I pushed the modifications on my blog online, and now the code appears too small on my Archlinux device too. |
Nimble install does not install my working directory of nimib. |
Are you using nimble v0.14 perhaps? They changed so much about local installations, I'll stay on 0.13 as long as I can. |
I used |
I think the preview looks good now, the inline code doesn't overflow and the code blocks looks the same size as the normal text on both my laptop and phone 🚀 |
The inline code does overflow for me for some reason. |
I wouldn't be suprised :P I guess you could do something like |
Huh, yeah that doesn't look too good. The inline code is fine, we can't increase its size after all without overflowing so there is nothing to do about it. If the font-size increase, the box around it increases so it's impossible for the inline code to be as big as the normal text. But the code blocks are pretty big/the normal text is small. I have done some checking on Firefox on my laptop and it seems the normal text gets the default text size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work on this @dlesnoff, I think there are still issues on the font sizes but this PR definitely addresses the specific issues it targets so I would actually vote for merging this and open a separate issue for the font sizes.
Agreed, and ideally someone who can reproduce the different font sizes should be the one to implement that PR so one doesn't have to wait for someone else just to know if it works or not. |
Fine by me, I will not be working on fixing the font sizes. You have accepted the changes but you have not merged the PR? Do you wait for the PR that will fix the font sizes? |
I think we were just waiting to be sure you did not plan to add something else. Thanks again, merged! |
And I guess the hint is that I will take the PR on font sizes, will open an issue and assign it later. ;) |
We just waited for confirmation by you I guess before we merged it 😉 |
Here is a PR with the changes proposed by @HugoGranstrom in #184 .
Fix #184 .