How to change button color of all pages

UI Components for Angular
Post Reply
bfrascino
Posts: 11
Joined: 13 Mar 2012, 09:13

29 May 2017, 04:31

Hi all,

I would like to customise the color of all buttons in default state of my application.

Inspecting the current class I found .ui-button class, so I have included in my component's css file the .ui-button class customised. Hey, it works!! :D

I was happy until I realised I would have to do the same for all my components... :(

So how can I affect all buttons from only one place?

Should I really be customising .ui-button class or there is another class I should do this change?

bfrascino
Posts: 11
Joined: 13 Mar 2012, 09:13

29 May 2017, 06:51

Ok,

I have the PrimeNG seed project, so I moved the css style to styles.css file and imported it in my app.component.ts

styles.css

Code: Select all

.ui-button {
	background-color: #b7ddfb!important;
	color: #175173!important;
}
app.component.ts

Code: Select all

import '../assets/css/styles.css';
...
This did what I wanted.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests