I was experimenting on custom styling the <select>
elements of a form I was building. One of the things I tried implementing was truncating the text with an ellipsis in case it extended beyond the <select>
's width. It didn't look consistent through browsers, but I've accidentally discovered something really nice.
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
/* The Grid ---------------------- */ | |
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row.large-collapse .column, | |
.lt-ie9 .row.large-collapse .columns { padding: 0; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row .row.large-collapse { margin: 0; } | |
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; } | |
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; } |
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
#home nav .home > a { | |
pointer-events: none; | |
cursor: default; | |
} |
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
selector: "textarea", // Select all textarea | |
selector: "textarea.editme", // Select all textarea with the class editme | |
selector : "textarea:not(.mceNoEditor)", // Select all textarea exluding the mceNoEditor class |
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
.scrollArea { | |
-webkit-transform: translate3d(0, 0, 0); | |
-webkit-backface-visibility: hidden; | |
-webkit-perspective: 1000; | |
} |
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
/** | |
* Given a source directory and a target filename, return the relative | |
* file path from source to target. | |
* @param source {String} directory path to start from for traversal | |
* @param target {String} directory path and filename to seek from source | |
* @return Relative path (e.g. "../../style.css") as {String} | |
*/ | |
function getRelativePath(source, target) { | |
var sep = (source.indexOf("/") !== -1) ? "/" : "\\", | |
targetArr = target.split(sep), |
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
//Validation for Sponsor in Application Edit/Show | |
function validate(){ | |
var hasSponsor = document.getElementById('hasSponsor'); //check box ID | |
if (hasSponsor.checked){ | |
sponsorUrl = document.getElementById('sponsorUrl'); //sponsor URL field ID | |
sponsorImage = document.getElementById('sponsorImage'); //sponsor Image field ID |
The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
OlderNewer