Category

CSS

Is an 80 Character Code Line Length Still Relevant?

By | C#, CSS, JavaScript, TypeScript, Visual Studio | No Comments

If you’ve spent any time reading about coding standards on the internet, you’ve probably come across the suggestion to limit lines of code to 80 characters and wondered if it’s still relevant today. The advise to limit lines to 80 characters is often connected to the historical limit of 80 characters in terminal windows. But what if your team is not subject to this constraint? Are there still any benefits to adopting this limitation? I tried living with it for a while and here are my takeaways. Growing pains Indentation When I first set out to try this style out,…

Read More

Kendo UI Customization with CSS

By | CSS, HTML5, Kendo UI | One Comment

I’ve been using Kendo UI for many years now and I continue to be impressed with the many ways it can be extended and customized. Recently, I had a client request a Kendo Grid customization that at first glance seemed like it might require some code changes, but in the end, it could all be done purely with CSS. Here is the scenario as a CSS customization example: by default, the Kendo Grid shows the sort icon immediately after the header text and when using the column menu with a filter applied, it highlights the border around the column menu…

Read More

Stop the Shake When Adding a Border on Hover

By | CSS, HTML5, Web | 4 Comments

A common scenario on a web page is to add a border around a clickable element when it is given focus.  Unfortunately this can cause a visible “shake” of the element and of any content below it when the border is displayed and when it is removed. Here is an example: Luckily there is an easy fix for this which is to include a transparent border on the element from the start. Here are the resulting CSS classes:

And now hovering over the image doesn’t “shake” the layout at all.

Read More