• Shaarli
  • Tag cloud
  • Picture wall
  • Daily
  • RSS
  • Login
4368 shaares
6 / 16
Filters
305 results tagged css

Modern CSS grid solutions to common layout problems

QRCode

Dynamic centered layout

We all know margin: 0 auto to center a layout. Ideal for article pages, right? But what if you want elements like images to exceed the maximum width of the article?

https://vycke.dev/blog/css-layout-patterns/
August 11, 2020 at 3:48:25 PM EDT *
css grid webdesign
FILLER

1-Line Layouts

QRCode

*10 Modern CSS layout and sizing techniques that highlight just how robust and impactful a single-line of styling code can be. [Watch the Video]

https://1linelayouts.glitch.me/
July 14, 2020 at 11:11:35 AM EDT *
css grid webdesign
FILLER

Learn Z-Index Using a Visualization Tool

QRCode

Let’s quickly go over the basics. The default position value of any HTML element is static. Any element with the default value of static is a non-positioned element.

  • Positioned elements with positive z-index values are placed in front of non-positioned elements.
  • Positioned elements with negative z-index values are placed behind non-positioned elements.
  • A z-index can be any positive (or) negative number including zero. It has no effect on a non-positioned element — position value of static.

Here is the key part - a child’s z-index has no effect outside its group. div3’s z-index determines its position in the stacking order only among its siblings and has no effect outside its group. This is the reason setting even a large value like 99999 to div3 won't place it in front of div1.

https://thirumanikandan.com/posts/learn-z-index-using-a-visualization-tool
June 23, 2020 at 9:15:57 AM EDT *
css webdesign
FILLER

What to Use Instead of Number Inputs

QRCode

Hanna Laakso documents the problems for GOV.UK. This is what they landed on:

 <input type="text" inputmode="numeric" pattern="[0-9]*">

The inputmode attribute is pretty great, and we have a deep dive on that.

Phil Nash came to (almost) same exact conclusion, and blogged about improving the experience of a two-factor auth code input on the Twilio blog:

<input
  type="text"
  name="token"
  id="token"
  inputmode="numeric"
  pattern="[0-9]*"
  autocomplete="one-time-code"
/>

That last attribute is interesting and new to me. It means you get this super extra useful experience on browsers that support it:

https://css-tricks.com/what-to-use-instead-of-number-inputs/
June 4, 2020 at 1:49:54 PM EDT *
css webdesign forms
FILLER

Everything I Learned About min(), max(), clamp() In CSS

QRCode

CSS Comparison Functions (min(), max(), clamp()) become supported in Firefox on 8 April 2020, which means that they are now supported in all major browsers. Those CSS functions will provide us with ways to have dynamic layouts and more flexible design components. They can be used for container sizes, font-size, padding. and a lot more. Even more, web designers might need to think differently while designing layouts because of these exciting CSS functions.

https://ishadeed.com/article/css-min-max-clamp/
May 18, 2020 at 2:03:08 PM EDT *
css
FILLER

The Ultimate Guide To CSS Grid - JavaScript Teacher - Medium

QRCode

You are probably already familiar with CSS box model for regular elements. Let’s begin with a similar “bird’s eye view” representation for the CSS Grid:

https://medium.com/@js_tut/the-ultimate-guide-to-css-grid-2c5ba7b47356
May 14, 2020 at 9:46:45 AM EDT *
css grid
FILLER

CSS Viewport Units

QRCode

To solve that issue, we need to give the title a minimum font size that it can’t go below it. CSS calc() to the rescue!

.title {
font-size: calc(14px + 2vw);
}
The calc() CSS function will have a base 14px value, and it will add 2vw to it. With that in hand, the font-size value won’t become too small.

https://ishadeed.com/article/viewport-units/
March 26, 2020 at 9:58:54 AM EDT *
css webdesign
FILLER

Single-direction margin declarations – CSS Wizardry – Web Performance Optimisation

QRCode

I’m not sure how I arrived at this rule, but I’m really glad I did and I would likely never ever change it. The basic premise is that you should try and define all your margins in one direction. This means always use margin-bottom to push items down the page, and margin-left to push them across the page. I’m going to focus mainly on margin-bottom throughout this article as it’s the most obvious to explain, but this can be applied to both directions (top/bottom, right/left).

https://csswizardry.com/2012/06/single-direction-margin-declarations/
March 13, 2020 at 4:05:21 PM EDT *
css margins webdesign
FILLER

Learn Box Alignment

QRCode

Are you ready to learn how box alignment works for CSS Grid and Flexbox? This article is for you.

https://ishadeed.com/article/learn-box-alignment/
March 7, 2020 at 7:50:59 PM EST *
flexbox grid css webdesign
FILLER

CSS { In Real Life } | Optimising SVGs for the Web

QRCode

Optimising SVGs (scalable vector graphics) for web projects has the dual benefits of reducing the file size and making them easier to work with. But plenty of times I’ve opened up a web project and found that SVG assets could be made significantly smaller with some straightforward optimisations. In this article I’ll share my process for optimising SVG assets, which may help you if you’re a designer or developer unfamiliar with working with SVG on the web.

https://css-irl.info/optimising-svgs-for-the-web/
January 28, 2020 at 9:10:16 AM EST *
svg css illustrator minify
FILLER

Understanding CSS Grid: Grid Lines — Smashing Magazine

QRCode

In the first article in this series, I took a look at how to create a grid container and the various properties applied to the parent element that make up your grid. Once you have a grid, you have a set of grid lines. In this article, you will learn how to place items against those lines by adding properties to the direct children of the grid container.

https://www.smashingmagazine.com/2020/01/understanding-css-grid-lines/
January 28, 2020 at 8:40:47 AM EST *
css grid
FILLER

13 ways to vertical center - LogRocket Blog

QRCode
https://blog.logrocket.com/13-ways-to-vertical-center/
January 13, 2020 at 3:21:17 PM EST *
css align
FILLER

GitHub - cssanimation/css-animation-101: Learn how to bring animation to your web projects

QRCode

Learn how to bring animation to your web projects https://cssanimation.rocks

https://github.com/cssanimation/css-animation-101
October 29, 2019 at 11:05:03 AM EDT *
css animation
FILLER

Google HTML/CSS Style Guide

QRCode
  • Specifying type attributes in these contexts is not necessary as HTML5 implies text/css and text/javascript as defaults. This can be safely done even for older browsers.
https://google.github.io/styleguide/htmlcssguide.html
August 21, 2019 at 10:43:32 AM EDT *
css webdesign styleguide
FILLER

Everything You Ever Wanted to Know About inputmode | CSS-Tricks

QRCode

The inputmode attribute that helps browsers on devices with on-screen keyboards decide which keyboard to display (e.g. telephone, numeric, email, search) has been around for long, but it wasn’t until a few months ago that Safari for iOS and Chrome for Android adopted it. Time to get familiar with the concept. Christian Oliff’s article “Everything You Wanted To Know About inputmode” is a great primer to dive deeper into the attribute and how to make use of it. (cm)

https://css-tricks.com/everything-you-ever-wanted-to-know-about-inputmode/
August 20, 2019 at 11:15:10 AM EDT *
css webdesign mobile
FILLER

This Ain’t Disney: A practical guide to CSS transitions and animations

QRCode

The answer is physics. Specifically Newtonian physics, the branch of science dedicated to apples falling from trees onto scientists, also referred to as classical mechanics.

https://blog.prototypr.io/this-aint-disney-a-practical-guide-to-css-transitions-and-animations-a8b87e7c5531
August 16, 2019 at 3:45:16 PM EDT *
css animation webdesign
FILLER

Button differentiation done right – UX Collective

QRCode

Buttons normally have those traits in common: font style, font size, font color, button color, button size, borders, rounded corners, drop shadow or glow effects, hover state and animations.

If we try to change too many of these traits, the buttons might feel too foreign to the general design of the project, and in this case the user will just click the most distinct one, and we’re basically back to just one CTA button.

https://uxdesign.cc/button-differentiation-done-right-5553605ea08a
July 12, 2019 at 1:11:46 PM EDT *
buttons css webdesign
FILLER

Designing button focus states for better usability - DEV Community 👩‍💻👨‍💻

QRCode

Many people exclusively use keyboards to navigate, and rely on the focus state to know where they are on the page.

There's a huge variety of reasons why someone might use a keyboard over a mouse, and for many, using the mouse as a fallback just isn't an option.

https://dev.to/elizabethschafer/designing-button-focus-states-for-better-usability-gm2
July 3, 2019 at 12:57:44 PM EDT *
css webdesign buttons accessibility
FILLER

46 Flex Layouts - ONE markup

QRCode
https://codepen.io/jakob-e/pen/XQyqpo
July 3, 2019 at 12:55:36 PM EDT *
flexbox css
FILLER

The Stack: Every Layout

QRCode

Since the declaration is not context sensitive, any correct application of the margin is a matter of luck. If the paragraph is proceeded by another element, the effect is desirable. But a :last-child paragraph produces a redundant margin. Inside a padded parent element, this redundant margin combines with the parent’s padding to produce double the intended space. This is just one problem this approach produces.

https://every-layout.dev/layouts/stack/
July 3, 2019 at 11:03:59 AM EDT *
css
FILLER
6 / 16
Shaarli · The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community · Documentation
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community