Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 737786 - 3/5 - Restrictions for ::-moz-placeholder. r=bz
Browse files Browse the repository at this point in the history
The restrictions are basicially the one used for ::first-line with a few additions required to style the placeholder by the UA or for the users. See the bug comments for more details (hopefully, there will be a doc and a spec soon enough).
  • Loading branch information
mounirlamouri committed Nov 9, 2012
1 parent 813f41a commit 131fb24
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 29 deletions.
23 changes: 19 additions & 4 deletions layout/style/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,12 @@ textarea::-moz-placeholder {
white-space: pre;
overflow: auto;
border: 0px !important;
/* The 1px horizontal padding is for parity with Win/IE */
padding: 0px 1px;
/*
* The 1px horizontal padding is for parity with Win/IE.
* We need to mark it !important to make sure it can't be changed on the
* placeholder.
*/
padding: 0px 1px !important;
margin: 0px;
text-decoration: inherit;
-moz-text-decoration-color: inherit;
Expand All @@ -147,12 +151,23 @@ input > .anonymous-div.inherit-overflow {

input::-moz-placeholder,
textarea::-moz-placeholder {
/*
* Changing display to inline can leads to broken behaviour and will assert.
*/
display: inline-block !important;

/*
* Changing resize would display a broken behaviour and will assert.
*/
resize: none !important;

overflow: hidden !important;

color: GrayText;
}

textarea::-moz-placeholder {
resize: none;
white-space: pre-wrap;
white-space: pre-wrap !important;
}

input:-moz-read-write,
Expand Down
Loading

0 comments on commit 131fb24

Please sign in to comment.