Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Webkit Extensions

Featured Replies

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?

  • 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 ?

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.

  • 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?

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 by rbrtsmith

 

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.

  • 2 weeks later...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.