How to style the divider in the AntD Card actions panel? - antd

Card Actions Divider Picture
I am using AntD Card componenent. I have tried to style the divider in the actions panel (shown in the picture) I have tried to set the css likeso:
.ant-card-actions {
// other code
.ant-divider {
background: white !important;
}
}

Using inline css
<Divider
type="vertical"
style={{ borderLeft: '2px solid white', height: '30px' }}
/>
Or
You can customize the css class
.ant-divider-vertical {
height: 20px;
border-left: 2px solid white;
}
Result: Screenshot

Related

How to change the border color of ngTagsInput with/without focus?

Given this HTML that declares the tags-input directive:
<tags-input class="bootstrap" ng-model="selected">
<auto-complete source="getList($query)"></auto-complete>
</tags-input>
This CSS doesn't change the border to blue:
.bootstrap .tags {
border: 1px solid blue;
}
This CSS doesn't change the border to red when ngTagsInput gets the focus
.bootstrap .tags:focused {
border-color: red;
}
If you see the HTML when tags-input is in focus, it applies a focused class when the input is focused. We can utilize that class to override our CSS.
I put the following CSS and it works for me:
.bootstrap .tags{
border: 2px solid blue;
}
.bootstrap .tags.focused {
border: 2px solid red;
}
And, what you tried to do in question (:focused) is not a pseudo-class, :focus is! :)
Here's the sample working plunker

Telerik Kendo Grid custom command icon

I use a kendo grid in my application with custom command for each line like this:
.Columns(
columns =>
{
//fields 1
//fields 2
columns.Command(command =>
{
command.Custom("View").Click("view");
command.Custom("Edit").Click("edit");
command.Custom("Delete").Click("delete");
}).Width(300);
}
)
It work but now I need to put icon (awesome font ?) instead of string.
Thank you for help
You can customize the look and like of the buttons with CSS. In the following example the button is customized with a background-image.
.k-grid-content .k-button {
width: 20px;
height: 20px;
border: none;
min-width: 0 !important;
border-radius: 0;
color: transparent;
text-indent: -10000%;
box-shadow: none !important;
}
.k-grid-content .k-button span {
display: none;
}
.k-grid-content .k-button.k-grid-Edit {
background: url(/img/icons/icon-edit.png) no-repeat;
}
I created a dojo for you. Hope it helps.
http://dojo.telerik.com/ETIYa/2

Changing background colour of a paper-dropdown-menu

I have a paper-droopdown-menu that displays normally. But I would like to change the backgroud colour as shown in the graphic below
I have tried the following but it did not affect the background.
* /deep/ paper-dropdown-menu::shadow #menu {
background-color: #eee;
border: 1px solid #ccc;
}
paper-dropdown-menu {
background-color: red;
}
or just the input element
paper-dropdown-menu::shadow #control {
background-color: red;
}
If this isn't what you want, can you please add the HTML to your question that produces the layout you have in your screenshot.

Html.ActionLink as an image button with vertically-centered text?

Simply put the question is - is there a way to align link text within an action link vertically?
I need to make a button-looking Html.ActionLink control.
There is a reasonably good example at Html.ActionLink as a button or an image, not a link
I have implemented this approach, however, I need not just an "image" button,
but an image button with a text shown on it, and this text depends on view model's state, so that I cannot simply put it on an image.
Here is what I have (Razor):
#Html.ActionLink(#commitee.Name, "CommiteePage", "SecureFolder",
new { commiteeName = commitee.Name, page = 1 },
new { #class = "commiteeButton" })
and CSS:
a.commiteeButton {
background: transparent url("../Images/BlueButton.png") no-repeat top left;
display: block;
width: 304px;
height: 50px;
color: white;
text-decoration: none;
font: normal 14px Arial;
text-align: center;
margin-bottom: 10px;
}
The result is OK, but: the text of a link is located on the top of an image, and not in its middle (vertically).
I do not know how to center link text vertically, so that it can be located right in the center of an image.
Of course, there can be another approach (see below) but maybe it is still possible with approach mentioned above?
<a class="nonunderlinedlink" href="#Url.Action("CommiteePage", "SecureFolder", new { commiteeName=commitee.Name, page = 1 }, null)">
<div class="commiteeButton">
<p class="pstyle">#commitee.Name</p>
</div>
</a>
Try the following changes in your css
a.commiteeButton {
background: transparent url("../Images/BlueButton.png") no-repeat top left;
display: block;
width: 304px;
height: 50px;
color: white;
text-decoration: none;
font: normal 14px Arial;
text-align: center;
margin-bottom: 10px;
display: table-cell;
vertical-align: middle;
}
Rex (see comments to my question above) suggested putting padding-top to CSS, that has resolved issue without causing collateral layout problems.
Thank you all for your quick reply!
I know it's a bit late but you could also use line-height: 50px; to center your text vertically

How to make jqgrid top toolbar custom buttons bigger like standard buttons

Style based on question jqGrid - How can I make the paging buttons bigger? is used to make jqgrid top level toolbar buttons bigger:
.ui-jqgrid .ui-jqgrid-toppager { height:35px !important; }
.ui-jqgrid .ui-pg-button { height:30px !important; width:30px !important;}
.ui-jqgrid .ui-jqgrid-toppager .ui-icon { position:relative; margin: 0px 10px;}
.ui-jqgrid .ui-jqgrid-toppager .ui-pg-div span.ui-icon {
margin: 0 10px !important;
}
/* some settings to place Button in jqGrid */
.ui-jqgrid .ui-pg-table .my-nav-checkbox
{
margin: 0px;
padding: 0px;
float: left;
height: 18px;
}
.ui-jqgrid .ui-pg-table .my-nav-checkbox > input
{
padding: 1px;
}
.ui-jqgrid .ui-pg-table .my-nav-checkbox > label
{
margin: 0px;
border-width: 0px;
}
.ui-jqgrid .ui-pg-table .my-nav-checkbox:hover > label
{
margin: 0px;
border-width: 1px;
}
/* fixing CSS of jQuery UI Buttons */
.ui-jqgrid .ui-pg-table .my-nav-checkbox > .ui-button > span.ui-button-text
{
margin: 0px;
padding: 1px 2px 1px 16px;
}
.ui-button-icon-only
{
width: 16px;
}
.ui-jqgrid .ui-pg-table .my-nav-checkbox > .ui-button > span.ui-button-icon-primary
{
margin: -8px 0px 0px -8px;
}
jqgrid toolbar contains also custom checkable buttons based on Oleg answer defined like:
var autoedit = false;
$("#grid_toppager_left table.navtable tbody tr").append(
'<td class="ui-pg-button ui-corner-all">' +
'<div class="ui-pg-div my-nav-checkbox">' +
'<input tabindex="-1" type="checkbox" id="AutoEdit" ' + (autoedit ? 'checked ' : '')+'/>' +
'<label title="Press to toggle"' +
' for="AutoEdit">Press to toggle</label></div></td>'
);
$("#AutoEdit").button({
text: false,
icons: {primary: "ui-icon-star"}
}).click(function () {
autoedit = !autoedit;
});
this custom button (star icon) in toolbar appears in wrong position: too right and together with next button:
Also width is smaller than standard button and top alignment is too big:
How to make custom button like standard button ?
If you need to use toolbar icons which are larger as standard I would recommend you to use Font Awesome icons in the navigator toolbar instead of standard jQuery UI icons. I described in the answer.
For example if I set just the following CSS in the old demo
.ui-jqgrid .ui-jqgrid-toppager { height:30px !important;}
.ui-jqgrid .ui-jqgrid-toppager .ui-pg-div>span { margin: 0 5px; font-size: 20px; }
I can use 20px icons in the top toolbar. The demo will shows the following results
Because all icons from Font Awesome are implemented just as vector fonts one get perfect results for any font size (icon size). One need of cause to post all other custom solution (like checkable buttons) to Font Awesome, but after some investments you could get very good final results.

Resources