Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,557,903
Community Members
 
Community Events
184
Community Groups

Can I narrow page width in Bitbucket Markdown?

https://bitbucket.org/blog/introducing-the-new-fluid-width-bitbucket

writes that

"The more code you can see on your screen, the easier it is to work with it. That’s why we broke away from our traditional fixed-width pages, and redesigned every page on Bitbucket to expand to the full width of your screen, as wide as your browser will allow."

I write my README.md for documentation and having too wide lines makes it hard to read.

So this is not what I want, I disagree with the above quote.

I would like to have a Markdown command that sets the width of the text body.

Is this possible in Bitbucket Markdown?

1 answer

2 votes
Riley Venable (Atlas Bench)
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 21, 2023
Bitbucket Markdown does not have a command for setting the width of the text body. However, you can add CSS styles to your README to control the layout and appearance of the text. You can do this by adding a `<style>` tag to the top of your README.md file and defining the styles you want to use. Keep in mind that these styles will only be applied when the README is viewed in a web browser, and may not be honored by all Markdown viewers.

I added the style tag at the very first line of README.md but it was displayed in verbatim both with Firefox and Chrome:

<style> article { width: 80em } </style>

(copy from the web page through the browser)

What shall I do?

Also, I have found this:

https://jira.atlassian.com/browse/BCLOUD-13044

asking how to add custom CSS to a Markdown page.

Is it allowed now? And, where is it officially documented?

https://jira.atlassian.com/browse/BCLOUD-6930

says that embedded HTML is shipped:

"The Bitbucket Cloud team has successfully shipped this feature to our customers!"

but I do not see in the Markdown documentation:

https://confluence.atlassian.com/bitbucketserver/markdown-syntax-guide-776639995.html

how I could do embedded HTML.

I agree with Buday_Gergely_Istvan.

README.md should not span the full width of my screen. It's not readable. Imagine this thread would be 100% of this window.

Also setting it to 1200px is not a good idea: https://jira.atlassian.com/browse/BSERV-6926

A solution would be some fixed number of "em". Because this translates into a fixed number of characters per line, which is exactly what we needfor readability.

Like Buday_Gergely_Istvan likes this

I tried adding

<style type="text/css" rel="stylesheet"> div { max-width: 50em; } </style>

in the first line of the README.md.

It works in the preview of VS Code but did not work on Bitbucket Server 7.19.3. It's not shown in verbatim, just not shown at all and not effect.

Like Buday_Gergely_Istvan likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events