Remove Column Filter Placeholder from Ng-Smart-Table - ng2-smart-table

Been fighting with ng-smart-table trying to find an elegant way to remove the Column Filter placeholder without overriding the javascript. I know i can modify node_modules the module within that directory but i need to modify this inside the component. Any ideas?
Here are my column settings. I've tried to modify the cell but nothing seems to override the placeholder which displays the name of the column.
public settings: any = {
actions: false,
noDataMessage: 'Loading... please wait!',
filtering: {filterString: ''},
className: ['table-striped', 'table-bordered'],
columns: {
customerName: {
title: 'Account',
class: 'topHeading',
},
}

I had the same problem just now and couldn't find any good workarounds posted anywhere. I ended up making the color of the placeholder the same color as the background of the input to "hide" the placeholder.
// Hide the placeholders in all browsers
.ng2-smart-filter input::-webkit-input-placeholder {
/* WebKit browsers */
color: #fff;
}
.ng2-smart-filter input::-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
color: #fff;
}
.ng2-smart-filter input::-moz-placeholder {
/* Mozilla Firefox 19+ */
color: #fff;
}
.ng2-smart-filter input::-ms-input-placeholder {
/* Internet Explorer 10+ */
color: #fff;
}

Related

Changing the color of placeholder text of a select element [duplicate]

This question already has answers here:
Change a HTML5 input's placeholder color with CSS
(43 answers)
Closed 2 years ago.
As per an answer to a stackoverflow question. I added a placeholder to html select element.
<option value="" selected disabled hidden><strong style="color:white">Choose here</strong></option>
Now the problem is, I want to change the color of placeholder text to white as my background is gray. It's not accepting any styling.
You can use ::placeholder pseudo in CSS, like this example:
::placeholder { color: #fff; }
If you want a cross-browser solution, you can use prefixes:
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
color: #fff;
}
::-moz-placeholder { /* Firefox 19+ */
color: #fff;
}
:-ms-input-placeholder { /* IE 10+ */
color: #fff;
}
:-moz-placeholder { /* Firefox 18- */
color: #fff;
}
The ::placeholder selector only selects the placeholder text inside your input, besides that, you can style the input itself when it is showing the placeholder using :placeholder-show.
Also, be aware that Firefox might show placeholder text lighter than it is supposed to display. to fix the issue you can use:
::-moz-placeholder {
opacity: 1;
}
is it googles material design ?
if its google material design i find that this answer is your solution i dont want to take credit of someone else afford so there is the link click here
if its not material design anyway did you try this?
::placeholder {
color: white;
}
its called pseudo\elements
you can read abut them here
the example that i wrote is taken from here

Change webview find on page result style using css?

In an Electron webview using findInPage, can you use css to change the result colors?
In the above image, the current find result is highlighted in orange while additional results are highlighted with yellow. I'd like to tweak the styling of both of these
body{
background-color:#000;
color:#fff;
}
h2::-moz-selection { /*Firefox*/
color: #000;
background: #FF9800;
}
::-moz-selection { /*Firefox */
color: #000;
background: yellow;
}
h2::selection {
color: #000;
background: #FF9800;
}
::selection {
color: #000;
background: yellow;
}
<h2>Select some text on this page:</h2>
<p>This is a paragraph.</p>
<div>This is some text in a div element.</div>
In Electron you can use stopfindInPage to stop the find and focus/activate a selection (activateSelection - Focus and click the selection node). As it is also possible to insert css, this may allow you to insert css to update the color/ bg=color of the selected text, by using something like the following :
::selection {
background: #ffb7b7; /* WebKit/Blink Browsers */
}
::-moz-selection {
background: #ffb7b7; /* Gecko Browsers */
}
I haven't tried it, it's just a suggestion from looking at the API.
There is an interesting article on css tricks that you may also find useful
Hope this helps, and that you find a solution
EDIT:
If you are on mac you could use setUserDefault in the system preferences.
In addition, if you use Nathan Buchar's electron settings, you can use the set method to adjust key values (in mac/windows/linux - see his faq)

upper case all characters in browser autofill dropdown

In the pop up drop down which opens up when typing starts on a html form. How can I capitalise all characters in each line of the list shown which reveals the previously entered values?
The following only make the first letter upper case.
input#plate {
text-transform: uppercase;
}
::-webkit-input-placeholder { /* WebKit browsers */
text-transform: none;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
text-transform: none;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
text-transform: none;
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
text-transform: none;
}
<input type="text" id="plate" autocapitalize="characters" placeholder="Enter Plate">
edit
Changing the none in the css to uppercase did not do it either.
The autofill drop-down list is a part of the browser user interface itself, so unfortunately its appearance can’t be modified. In this respect, it’s like a context menu.
The ::placeholder pseudo-element can be used to style a placeholder text, like the one in the Stack Overflow’s search field (Search Q&A) in the page header.

AngularJS and text-angular: Change CSS style for input placeholder

On wiki page of text-angular github project, it says:
https://github.com/fraywing/textAngular/wiki/Styling-the-Editor
I tried with this code:
<div text-angular="text-angular" ta-toolbar="[]" ng-model="message"
placeholder="<div class='placeholder'>Write Coment...</div>"></div>
But the screen will show as:
placeholder show as raw html
I tried the following after taking a look at this website: https://css-tricks.com/almanac/selectors/p/placeholder/
::-webkit-input-placeholder { color: red; }
It still didn't work. How can I give custom styles to my input placeholder?
placeholders should be used with input elements and not on divs. You'd probably have to change your div tags to inputs.
You had the right idea about styling a placeholder, but you may need to adjust the vendor prefixes depending on your browser
Chrome, Safari, Opera, Edge): ::-webkit-input-placeholder
Firefox 4 through 18: :-moz-placeholder (Only one colon)
Firefox 19+: ::-moz-placeholder (two colons)
IE 10 and IE 11 :-ms-input-placeholder
/* Chrome, Safari, Opera and Edge */
::-webkit-input-placeholder { color: red; }
/* Firefox 4 through 18 */
:-moz-input-placeholder { color: red; }
/* Firefox 19+ */
::-moz-input-placeholder { color: red; }
/* IE10 and IE11 */
:-ms-input-placeholder { color: red; }
<input placeholder="Content here" />
Another thing you could try is to attach a contenteditable property to your div which will make it behave kind of like an input element. You can then set a data property to simulate the behavior of a placeholder.
Use the before pseudo selector which will target the div only when it's empty and not focused on.
[contenteditable=true]:empty:not(:focus):before{
content:attr(data-text);
color: red;
}
div {
border: 1px solid black;
}
<div contenteditable="true" data-text="Enter text here"></div>
I found a way myself.. To let the Answer part standing out to other similar questions, I choose to post answer here instead of editing original question.
Use .placeholder-text class. It's not a customized class but it's the temporary class used by text-angular when it is displaying placeholder.
.ta-bind {
&.placeholder-text {
color: red;
}
&:not(.placeholder-text) {
color: black;
}
}
( Example is in scss, remember to covert if you are using css)

Placeholder not working mozilla latest with bootstrap

Bootstrap v2.3.1 - less placeholder styles working on chrome but not working on Mozilla latest version
Please help
Less code here
.placeholder(red);
Mozilla Updated Syntax
In the version 19.0 release notes, it states it changed the -moz-placeholder from being a pseudoclass (:-moz-placeholder) to a pseudoelement (::-moz-placeholder, note the double colons) which was implementing this bug fix. Apparently it was not made backwards compatible, because the double-colon syntax works in this fiddle but the single colon syntax does not.
However, Bootstrap at present (6-6-2013) has the pseudoclass (single colon) version in its mixin (line 83 as of this writing). So you need to either go in an manually fix the mixins.less file of bootstrap to correct it to the new syntax (not my first choice), or create your own override mixin to also add the new syntax, like so (better choice):
.placeholder(#color: #placeholderText) {
&::-moz-placeholder {
color: #color;
}
}
Once bootstrap is updated to version 3, then you can get rid of your override mixin.
change mixins file
// Placeholder text
// -------------------------
.placeholder(#color: #placeholderText) {
&:-moz-placeholder {
color: #color;
}
&:-ms-input-placeholder {
color: #color;
}
&::-webkit-input-placeholder {
color: #color;
}
&::-moz-placeholder { // this for latest mozilla
color: #color;
}
}
<style>
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
color: pink;
}
::-moz-placeholder { /* Firefox 19+ */
color: pink;
}
:-ms-input-placeholder { /* IE 10+ */
color: pink;
}
:-moz-placeholder { /* Firefox 18- */
color: pink;
}
<style>
<input type="email" placeholder="anytext">