Comments (6)
http://polarblau.github.com/smarttruncation/
https://github.com/STRML/jquery.textFit
http://tpgblog.com/2009/12/21/threedots-the-jquery-ellipsis-plugin/
from ui_alchemy-rails.
are you sure we need this? they all feel a bit heavyweight when we could just use modernizr
like in this gist https://gist.github.com/564334
from ui_alchemy-rails.
The issue with this is two fold:
- older browsers do not support this CSS
- For multi-line blocks, the CSS directives do not properly ellipsis
On Thu, Nov 29, 2012 at 5:57 AM, Andy Fitzsimon [email protected]:
are you sure we need this? they all feel a bit heavyweight when we could
just use modernizrlike in this gist https://gist.github.com/564334
—
Reply to this email directly or view it on GitHubhttps://github.com/ui-alchemy/alchemy/issues/62#issuecomment-10842847.
Go Pack and War Eagle,
Eric D. Helms
Ph.D. Student - North Carolina State University
from ui_alchemy-rails.
I agree. the low-fi nojs way I have done before would be to manually truncate our output based on an max char value
the html
<label>long long label with a<span>really long name</span></label>
and the CSS
label span{display: none}
label:hover span{ display: inline;}
label:after {content:"..."}
label:hover:after{content:""}
from ui_alchemy-rails.
@andyfitz I don't think this is good idea, since we use translations. The parts length will vary.
from ui_alchemy-rails.
You're part right, character length only ever has the same physical width with monospaced fonts and even then, translation can load differently sized monospaced fonts for different glyph styles.
I'm thinking of JS fallbacks for this behaviour and truncating at 12 - 22 characters will be within 100 pixels regardless of string type or translation. It would solve the problem of very large strings breaking out layout and still being interactively visible.
Yes the cop-out means we'll have various ellipsis ending around about the same area but not exactly the end of line.
For a js enhancement we could remove the span tags (which would remove the effect) and then use a polyfill or something similar to get the ellipsis happening at exactly the end of the border box.
Just thrashing about with ideas here.
from ui_alchemy-rails.
Related Issues (20)
- Renaming project HOT 48
- First-use interactive tours
- Icons HOT 4
- Multiple Select HOT 2
- Date Picker HOT 2
- Number Input
- File Chooser
- Select Box
- Range Input
- Checkbox and Radio
- Progress Bar
- Resizable
- Dialog
- Alchemy gem doen't have a description and summary. HOT 3
- Make the Login Page easier and clearer to implement with instructions
- Need global namespace variable hook
- menu navigation system needed
- rubygem-alchemy fails to build on Fedora 17 HOT 1
- Allow font URLs to be configurable through SCSS variable.
- Login and Password resets workflow proposal HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ui_alchemy-rails.