Skip to content

Conversation

@maelle
Copy link
Contributor

@maelle maelle commented Jun 14, 2021

Fix #1084 (if I understood the problem correctly)

Copy link
Collaborator

@cderv cderv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will reduce the pre background and code won't be aligned anymore with the outside text

From the issue,

Code should occupy full width of block

Do we want either the opposite and get the pre background to be aligned with the other pre background outside of rmdnote box ?

To illustrate the above, with this PR here is what it looks like:
image

Code and text in the box are no more aligned which does not feel right to me.

Is the screenshot posted in #1084 what it should look like ? Because it seems that the link in mastering-shiny already looks like that.

@maelle
Copy link
Contributor Author

maelle commented Jun 14, 2021

Because it seems that the link in mastering-shiny already looks like that.

Yes I guess I do not understand what the issue is.

@cderv
Copy link
Collaborator

cderv commented Jun 23, 2021

@maelle see answer in #1084 (comment)

Like how code blocks on a narrow page occupy the full width of the column, the code block within a note should also occupy the full width (i.e. no gap between left and right side of code block and containing border). Does that make sense? It's not easy to describe in words.

So this PR is not yet quite right. Do you have time to change or should I do this ?

@cderv
Copy link
Collaborator

cderv commented Jun 25, 2021

cc @apreshill as we discussed it yesterday.

@maelle
Copy link
Contributor Author

maelle commented Jun 25, 2021

image

Btw whilst looking at this on different screen sizes it made the need for a copy-button fix (to not make it hide code) look even more important. 😬

@cderv
Copy link
Collaborator

cderv commented Jun 25, 2021

I think I would keep the code content align with the text content even if we make the background full width

It would look like this
image

@cderv cderv requested a review from apreshill June 25, 2021 12:32
@cderv
Copy link
Collaborator

cderv commented Jun 25, 2021

what is your feeling on this one @apreshill ? I'll tweak the implementation following what we decide.
Thanks @maelle !

@apreshill
Copy link
Contributor

I agree @cderv - I tend to prefer keeping the text aligned inside the note box.

@cderv
Copy link
Collaborator

cderv commented Jun 25, 2021

So background full width and text align it will be! Thanks.

@cderv
Copy link
Collaborator

cderv commented Jun 29, 2021

This will now look like this
image

@cderv cderv changed the title Fix alignment of text blocks within rmdnote divs bs4_book(): Fix alignment of text blocks within rmdnote divs Jun 29, 2021
@cderv cderv merged commit 9a7f33c into rstudio:master Jun 29, 2021
Copy link
Contributor

@apreshill apreshill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM- thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code block in rmdnote needs margins adjusted

3 participants