-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
input[type="text"], textarea { | ||
font-family: 'Times New Roman'; /* a proportional font makes it more difficult to calculate the position */ | ||
font-size: 14px; | ||
line-height: 16px; | ||
padding: 24px 32px 16px 8px; /* different paddings so position computations don't accidentally return a "correct" result */ | ||
text-transform: uppercase; /* this drastically changes character width on proportional fonts */ | ||
text-indent: 20px; | ||
border: 16px lightblue dotted; /* needs to be accounted for when returning the final position */ | ||
border-right-width: 24px; /* discourage naive border arithmetic */ | ||
background: lightyellow; | ||
tab-size: 20; | ||
-moz-tab-size: 20; | ||
} | ||
input[type="text"], textarea { | ||
font-family: 'Times New Roman'; /* a proportional font makes it more difficult to calculate the position */ | ||
font-size: 14px; | ||
line-height: 16px; | ||
padding: 24px 32px 16px 8px; /* different paddings so position computations don't accidentally return a "correct" result */ | ||
text-transform: uppercase; /* this drastically changes character width on proportional fonts */ | ||
text-indent: 20px; | ||
border: 16px lightblue dotted; /* needs to be accounted for when returning the final position */ | ||
border-right-width: 24px; /* discourage naive border arithmetic */ | ||
background: lightyellow; | ||
tab-size: 20; | ||
-moz-tab-size: 20; | ||
} | ||
body { | ||
width: 400px; | ||
position: relative; | ||
} | ||
#input-textarea-caret-position-mirror-div { | ||
background: #ddd; | ||
position: fixed; | ||
top: 150px; | ||
left: 400px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters