Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

How to get title centered in AppBar? #222

Open
robsch opened this issue Apr 16, 2021 · 1 comment
Open

How to get title centered in AppBar? #222

robsch opened this issue Apr 16, 2021 · 1 comment

Comments

@robsch
Copy link

robsch commented Apr 16, 2021

In the documentation the title item is always left. How to get it centered? And right aligend?

@Florian-Schoenherr
Copy link
Collaborator

bad solution:

<style>
	:global(.s-app-bar__title) {
		flex-grow: 6;
		text-align: right; /*or center*/
	}
</style>

better but hacky:

<style>
	:global(.s-app-bar__title) {
		flex-grow: 1;
		text-align: center;
	}
	:global(.s-app-bar__wrapper) > div {
		flex-grow: 0 !important;
	}
</style>

I would say in the rewrite of the lib there will be a better way, for now this is sufficient.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants