Bootstrap theme for JSGrid - css

My application is using Bootstrap and for a certain functionality JSGrid is very adequate, but JSgrid has its own colors and styles. Please let me know if you know of any Bootstrap themed JSGrid css.

You can override the styles in the jsGrid-theme.css like this and add it to your own stylesheet after loading the jsGrid stylesheet:
.jsgrid-header-row > .jsgrid-header-cell {
background-color: red;
color: blue;
font-size: 0.8em;
font-weight: normal;
}

Related

CSS Master Styling Clarification

I have seen conflicting information about how to use a master style sheet and have experienced some bugs when testing methods. Just want to get clarification on the proper way to do this.
I would like to store cross website branding styles in a master global.css sheet and make page specific adjustments on a second .css file.
For example, this code would live on the master sheet:
#headline1{
font-family: 'Roboto', sans-serif;
font-size: 96px;
letter-spacing: -1.5px;
}
and this code would be page specific:
.headline {
color: #FFFFFF;
text-align: center;
}
I have recently read something that said you should not use ID in this manner. I've also run into issues when using it multiple times in the same grouping. I initially tried doing this using just classes instead of the ID, but it never worked. Not sure why.
Is this method considered proper? If not what is the proper way to do this?
If you create a master.css with:
.headline {
font-family: 'Roboto', sans-serif;
font-size: 96px;
color:#000
letter-spacing: -1.5px;
}
You can build upon/replace it per page as long as your custom css comes after the master.css
.headline {
font-size: 45px;
color: #FFFFFF;
text-align: center;
}
Quick example of a page:
<link rel="stylesheet" type="text/css" href="master.css"/>
<style>
.headline { //
font-size: 120px; // size overides master
color: #FF0000; // color overides master
text-align: right; // added alignment, which is overiding the browsers base css
}
</style>
I'm not sure if this is quite what you are looking for, but I hope it helps
In the example you provided a can only assume you have something along the lines of:
<div id="headline1"><span class="headline">Title</span></div>
This would basically mean any style applied to the div, the span would inherit unless told otherwise.
To further expand on this, you can also use inline styles <span style="color:#FFF"> which will dominate any other styling UNLESS an !important; has been added to a style element.

Zurb foundation - remove the background colour from buttons?

How do I remove the background colour from buttons in Zurb Foundation?
<button class="button button-arrow">Button <i class="icon-arrow-right">→</i></button>
CSS/ LESS:
.button-arrow {
background-color: none;
color: black;
font-size: #text-font-size;
text-decoration: underline;
padding-left: 0;
padding-top: 0;
padding-bottom: 0;
&:hover {
background-color: none;
color: #colour-dark;
}
}
Does not work obviously. Any ideas?
change it to : initial, this is the default value of the background-color property
You need to update the .button class:
.button {
background-color: transparent;
}
Make sure your Foundation overrides are in a stylesheet loaded AFTER Foundation styles are loaded so you can use specificity to override them.
The Foundation docs also talk about using SASS to edit the default variables controlling button styles:
The default styles of this component can be customized using these
Sass variables in your project's settings file.
$button-background

How to remove heading styles with an inline CSS code

I have a question about CSS, i don't know how to remove​styles of a class with an inline CSS code.
Let me explain more,
I have a CSS file named styles.css
In this file for example my h2 has some styles, now in my article i want to use h2 but i want to remove h2's default styles(written in styles.css) for this heading.
I guess there should be a way for this case, but i don't know how?
Please tell me this css code and teach me something new.
Thanks
Edit:
Please take a look to bellow picture. As you can see this h2 has some styles, can you see the pink vertical line in right side?
Now i want to remove this h2's styles with a css code. I guess something like my heading here should exist in CSS3. Am i right? Is there any css code for removing external css styles with an inline css code?
https://preview.ibb.co/m4BLda/Screenshot_2017_09_04_01_44_09_1.png
Here is the code:
h2 {
border-right: 4px solid #E20070;
font-size: 22px;
margin: 1.5em 0;
padding-right: 1em;
font-family: "Yekan",'irans',tahoma;
font-weight: normal !important;
}
You said inline, but you should really keep your styles in a separate stylesheet file. Now, in your styles.css file add your own class:
/* styles.css */
h2 {
font-size: 18px;
}
.my-other-title {
color: red;
border-right: 0;
}
<h2>My title</h2>
<h2 class="my-other-title">My other title</h2>
Why does this even work? Because of CSS specificity:
Specificity determines, which CSS rule is applied by the browsers
Take your time learning more by reading this article
Remove the existing class for your heading if there is and use your own custom class instead of writing everything inline.
h1{
font-size:15px;
color:blue;
}
/* target your h1 element */
.custom-css{
font-size:25px;
color:red;
}
<h1>Heading with general css<h1>
<h1 class="custom-css">Heading with custom css</h1>
Although its not good to change the semantic of an HTML Element.
CSS - Default for h2 (from external css source)
h2 {
border-right: 4px solid #E20070;
font-size: 22px;
margin: 1.5em 0;
padding-right: 1em;
font-family: "Yekan",'irans',tahoma;
font-weight: normal !important;
}
You want to override the default css through inline css. Try using below code for your h2.
<h2 style="border-right: 0px; padding: 0; margin: 0;"> Hello </h2>
You can also add a class to the h2 and call the class to your stylesheet if this style is applied to most of the h2 tags. Try to avoid inline css if possible, it may cause loading time.
<h2 style="color:white; font-size:80px"> My Cool Text </h2>
You have to write what you want to replace, for example, I changed color here.

is there a reason my .jumbotron p isn't formatting the correct size?

i'm relatively new with this stuff, but i can't seem to figure out why the size isn't formatting?
CODEPEN: https://codepen.io/minacosentino/pen/YxLLQw
.jumbotron p {
font-family: 'Montserrat', sans-serif;
color: #ffffff;
font-size: 4rem;
font-weight: 200;
text-align: center;
}
It's because you have written the link tag inside the HTML section of the codepen.
To add any external css make use of GearIcon on the CSS Section and add the links there. Doing so, make the libraries get added on top of the webpage and your css written in the CSS section can override those styles.
Just as Josan already commented: There is a rule for ".jumbotron p" in bootstrap CSS defining "font-size". To make your CSS override that, link your external style sheet after bootstrap.

Customization of the theme of several GWT modules

I have several modules with smartGWT using the same visual theme. Have I to create my own CSS-file and there overwrite necessary classes? If I plug this file to the host-pages of the modules, will my styles always override the standard themes classes?
I used to override somme native style in my css file, the only care I take is to add !important to force my style whatever style is apply by the framework
For exemple:
.formTitle,.formTitleFocused,.formTitleDisabled {
font-family: Arial, Verdana, sans-serif !important;
font-size: 11px !important;
color: black !important;
}
.splitbar:hover {
cursor: e-resize !important;
}
Hope it could help..
The appropriate way to theme/skin SmartGWT is described here.

Resources