I am trying to change the default color of vuetify table header. I managed to change the header using custom class using code below:
headers = [
{
text: "Metering Point",
align: "start",
sortable: true,
value: "meteringpoint",
class: "success--text title"
},
]
Unfortunately, the checkbox style for select all is still on default color. As the header for the check box is not declared on the array headers so it is not declared with the custom class.
Previously I tried to overwrite it on the tag with this code below:
.v-data-table-header {
background-color: grey;
}
but it doesn't work.
how do I declare the class for the checkbox? Or is there any possible way for me to overwrite the default styling?
As said by #StevenSiebert. I need to check what is the class after being rendered.
I checked the table header class name and use this code inside the style tag to change the style for that class:
::v-deep .v-data-table-header {
background-color: #DCDCDC;
}
Here is the reference I found for Scoped CSS in Vue: https://vue-loader.vuejs.org/guide/scoped-css.html#deep-selectors
when taking a look at the official Vuetify Docs here: Vuetify API
It gives the option to set checkbox-color on the v-data-table (for all checkboxes) or v-data-table-header (for the select all checkbox) which would be my choice considering it is officially supported.
<v-data-table
:items="desserts"
headers = [
{
text: "Metering Point",
lign: "start",
sortable: true,
value: "meteringpoint",
class: "success--text title"
},
]
checkbox-color="#DCDCDC"
></v-data-table>
Related
In my case I just want to change the default default color, take as example the default home section:
We recommend building UIs with a [**component-driven**](https://componentdriven.org)
That leads to:
I'd like to change that blue to, say, red.
I saw that the a class has the following themes:
class="sbdocs sbdocs-a css-19nbuh3"
So, I created a .storybook/manager-head.html and inside I wrote:
<style>
.sbdocs-a {
color: red;
}
But I see no changes! What am I doing wrong?
You can do this two ways but all in .storybook/preview.js.
Altering the docs theme:
export const parameters = {
...
docs: {
theme: {
colorSecondary: 'red',
},
},
...
};
This have the side effect to cause other unwanted components to change their color, as this color is not used only for links.
Provide your own <a> component to docs [best solution]:
export const parameters = {
...
docs: {
components: {
a: ({children, ...args}) => <a style={{color: 'red'}} {...args}>{children}</a>
},
},
...
};
This is the best way i found to style docs components.
also token name used for a can be found in storybook sources
See theming docs page for a full theme example.
I have been trying to learn styling in extjs, but I cannot figure out how it works. In a very simple example, I would like to apply some styles to panel header:
app.js
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.create('Ext.panel.Panel', {
title: 'MyPanel',
cls: 'title',
renderTo: Ext.getBody(),
items: [{
xtype: 'button',
text: 'myButton'
}, {
html: 'Hello World!!!',
}]
})
}
});
So, according to documentation I managed to change header background-color with the following css file:
app.css
.title .x-panel-header {
background-color: pink;
color: red; /* this doesn't work */
font-size: 22px; /* this doesn't work */
}
The problem is that some theme variables aren't applied correctly - for example, text color or font-size, although these variables are specified according to documentation for panel header. What am I missing?
Almost all ExtJS components have a style or cls property.
Manually overriding the extjs css classes should be the last resort.
In your case you should be looking at these components:
Ext.panel.Header
Ext.panel.Title
The panel component should have a header config and the header component should have a title config to customize each part.
Here is working example: Sencha fiddle example
For the sass variables you mentioned
They are used to customize ExtJS Themes. So if you want to make your own theme with let's say triton as base you can use these variables to create your own theme. This is quite useful if you want to make overrides for the whole theme (e.g. the background color of all Ext.panel.Panel components)
I'd recommend you to read this guide for more information on this subject: Theming guide
I am currently designing a table that was made with rc-table. I made the last row for actions which renders the buttons edit and delete. I want to edit it's style with Sass but I was unable to
I also specified classes for both the edit and delete button since they'll have different background-colors.
Is it possible to access it directly via a class? or is there another way which I don't know about.
for example if you have something like this in your code
this.columns = [
{
title: 'Operations', dataIndex: '', key: 'd', render: (text, record) =>
<a className="delete-btn" onClick={e => this.onDelete(record.key, e)} href="#">Delete</a>,
},
];
you can add class t the a element and the overwrite those styles with your CSS/SASS.
like this
.rc-table td {
background-color: 'red';
// custom styles here
}
notice the className attribute in a.
I have a button. and i need to align it to the right, make the font size increase and bold etc. When i googled it says i should use CSS.
How can i use CSS, to style the button that i added ?
My Question :
Where should i add the CSS file in my application, and how can i use it to style the button ?
items: [
{
xtype: 'button',
align: 'right',
text:'Assign'
}
]
items: [
{
xtype: 'button',
align: 'right',
text:'Assign',
cls : 'foo'
}
]
And in a CSS file:
.foo { background:black; }
This adds a CSS class to the outer most element of the Button. There may be many elements involved in the DOM markup, so use Firebug to figure out which elements you want to style.
More details in Ext docs: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.button.Button-cfg-cls
I would like to add a class to my "formatselect" options of the tinyMCE in Wordpress. So when selecting a h1 from the dopdown it should generate a <h1 class="blue">.
I found this Post, but can't get it to work.
Any ideas?
Thanks in advance!
What is described there is working even though not suitable for everyone. I'll give you a short list of what you need to do:
1. use the content_css tinmce init setting
content_css: "http://www.mydomain.com/css/content.css",
2. Create a content.css file containing your class
h1.foo {
background-color: #F067A0;
}
3. use the styleformatting tinmce init setting
style_formats: [{
title: 'My Foo styles'
}, {
title: 'Foo',
block: 'h1',
classes: 'foo',
exact: true
,
4. Make sure you have the style button included (tinymce init)
theme_advanced_buttons1: "styleselect",
You should be able to select text from the h1-tag in the editor and select foo from the dropdown menu of styles. The class should be applied to your selected text.