0

I am naive to SCSS. I'm planning to convert the 'data-placeholder' following code in html to bold in SCSS:

 <optic-select-input id="placeholder"data-placeholder="Choose or type  
  subject..."  title = "Type your subject">

Here is my effort in SCSS:

 optic-select-input {
     data-placeholder {
         font-weight: bold;
     }
 }

However, this is not showing any impact. Any help would be highly appreciated.

Derick Alangi
  • 1,080
  • 1
  • 11
  • 31
  • `data-placeholder` isn't a standar attribute, is a generic `data-*` attribute, it does nothing by itself. I suppose you have a JavaScript which read the value of `data-placeholder` and display it. Can you show us a working example? –  Sep 22 '16 at 07:17

2 Answers2

0
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
  font-weight: bold;
}
::-moz-placeholder { /* Firefox 19+ */
  font-weight: bold;
}
:-ms-input-placeholder { /* IE 10+ */
  font-weight: bold;
}
:-moz-placeholder { /* Firefox 18- */
  font-weight: bold;
}

more info on https://css-tricks.com/snippets/css/style-placeholder-text/

Update

Placeholder Mixin SCSS/CSS

Community
  • 1
  • 1
Stormhashe
  • 704
  • 6
  • 16
0

https://github.com/Igosuki/compass-mixins

@import 'compass-mixins/lib/compass';

.optic-select-input{
  @include input-placeholder {
    font-weight: 700;
  }
}
poashoas
  • 1,790
  • 2
  • 21
  • 44