svelte-materialify icon indicating copy to clipboard operation
svelte-materialify copied to clipboard

How to get title centered in AppBar?

Open robsch opened this issue 4 years ago • 1 comments

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

robsch avatar Apr 16 '21 14:04 robsch

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.

Florian-Schoenherr avatar Apr 16 '21 16:04 Florian-Schoenherr