October 5, 201511 yr Afternoon all, I've been playing around with text-overflow: ellipsis and this is great for 1 liners, however I wondered if it was possible to use this with multi lines. After a serious amount of Googling all I could come up with was to use -webkit-line-clamp, however on the MDN site is says not to use it in websites, where as alot of "personal blogers" shall we say have suggested using this. What are your thoughts?
October 5, 201511 yr I have in the past used this: http://dotdotdot.frebsite.nl/ Although typically now I just let the CMS handle truncations of text bodies.
October 6, 201511 yr Author Thanks for that, What are your views on using the unsupported web extensions, even though there are several developers suggesting to use these? Is it best I don't use them until they are supported ?
October 6, 201511 yr could you give me an example? If you mean something that is only available through a browser extension then I'd tend to give it a miss - not many people outside the dev community install extensions besides say something like adblock. I don't want to put much energy and the clients budget into stuff that hardly anybody is going to benefit from.
October 6, 201511 yr Author Well as an example: -webkit-line-clamp which is used for truncating text, MDN suggests not to use it where as css-tricks suggests it as an option. Do I follow the guide of MDN or do I throw caution to the wind and follow css-tricks?
October 6, 201511 yr Ok, they are more often referred to as vendor prefixing. I never write them. I let autoprefixer handle any prefixing - Features that require vendor prefixing is constantly changing and it makes sense to allow a tool to automate that. if I write transform: scale(1.5); Autoprefixer will output something like -webkit-transform: scale(1.5); -moz-transform: scale(1.5); -ms-transform: scale(1.5); -o-transform: scale(1.5); transform: scale(1.5); https://github.com/postcss/autoprefixer Regarding the line clamp, i've experimented with it a lot and the JavaScript version which I posted above was the most consistent across the browsers. But again I think this is something best controlled by the back-end. Edited October 6, 201511 yr by rbrtsmith
October 6, 201511 yr Regarding the line clamp, i've experimented with it a lot and the JavaScript version which I posted above was the most consistent across the browsers. But again I think this is something best controlled by the back-end. I agree with Robert here, otherwise you still output all of the content and simply hide it. It's easy to do in pretty much any server-side language.
October 14, 201511 yr i have been used most of the time following webkite http://api.jquery.com/jquery.browser/
Create an account or sign in to comment