惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
The GitHub Blog
The GitHub Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Recorded Future
Recorded Future
Y
Y Combinator Blog
Cloudbric
Cloudbric
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Schneier on Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
Cybersecurity and Infrastructure Security Agency CISA
TaoSecurity Blog
TaoSecurity Blog
Security Latest
Security Latest
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
D
DataBreaches.Net
Security Archives - TechRepublic
Security Archives - TechRepublic
H
Hacker News: Front Page
C
Cisco Blogs
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
Recent Commits to openclaw:main
Recent Commits to openclaw:main
V
Vulnerabilities – Threatpost
L
LINUX DO - 最新话题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Google Online Security Blog
Google Online Security Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
A
About on SuperTechFans
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Jina AI
Jina AI
C
CXSECURITY Database RSS Feed - CXSecurity.com
Schneier on Security
Schneier on Security
T
Tenable Blog
N
News and Events Feed by Topic
W
WeLiveSecurity
有赞技术团队
有赞技术团队
AI
AI
爱范儿
爱范儿
大猫的无限游戏
大猫的无限游戏
Latest news
Latest news
T
The Blog of Author Tim Ferriss
S
Security Affairs
Know Your Adversary
Know Your Adversary
Simon Willison's Weblog
Simon Willison's Weblog
G
GRAHAM CLULEY
Google DeepMind News
Google DeepMind News
The Cloudflare Blog

Bryan Robinson's Blog

Does our technology still work for us? Product pricing, dev bad habits, and the role of the pit of success Astro Server Island for latest Bluesky post (heavily cached!) Type-safe environment variables in Astro 5.0 New Website, but really is it? Netlify Durable Cache: Caching for a third-party world Introducing the Hygraph Astro Content Loader Integrating Astro.js Starlight Documentation into a Next.js Project Using Proxies Jamstack is meaningless 😱 Book Release: Eleventy by Example – Learn 11ty with 5 in-depth projects 11ty Second 11ty: Creating Template Filters 11ty Second 11ty: Global Data files (JS and JSON) 11ty second 11ty: The Render Plugin Part 1 Help needed: Netlify Frontend environment variables with Astro.js Quick experiment with the Slinkity 11ty plugin Creating a dynamic color converter with 11ty Serverless Using 11ty JavaScript Data files to mix Markdown and CMS content into one collection How to show your template code in 11ty blog posts New City, New Job, New Content Using Nunjucks Climbing the 11ty Performance leaderboard with Cloudinary, critical CSS and more Three JAMstack movements to watch in 2020 Create a Codepen promo watermark with no additional HTML, CSS or JS 3 underused CSS features to learn for 2020 Use CSS Subgrid to layout full-width content stripes in an article template Adapt client-side JavaScript for use in 11ty (Eleventy) data files CSS Gap creates a bright future for margins in Flex as well as Grid Create your first CSS Custom Properties (Variables) Use CSS Grid to create a self-centering full-width element Creating an 11ty Plugin - SVG Embed Tool Now offering design and code reviews at PeerReviews.dev Routing contact-form emails to different addresses with Netlify, Zapier and SendGrid Create an Eleventy (11ty) theme based on a free HTML template Client work and the JAMstack Grid vs. Flex: A Tale of a "Simple" Promo Space Using Eleventy The Tech Barrier to Entry What Can We Learn from CERN Let Practical CSS Grid - Launching My First Course Build Trust on the Web incorporating User Worries with your User Stories 2019 The Year of Markup-First Development Refactoring CSS into a Sass mixin Starting a new journey with Code Contemporary Dynamic Static Sites with Netlify and iOS Shortcuts Top 3 uses for the ::before and ::after CSS pseudo elements How To: Use CSS Grid to Mix and Match Design Patterns Use CSS ::before and ::after for simple, spicy image overlays 3 Strategies for Getting Started with CSS Grid CSS Tip: Use rotate() and skew() together to introduce some clean punk rock to your CSS The 5 Stages of Grid Love How To: A CSS-Only Mobile Off Canvas Navigation How To: Use CSS Grid Layout to Make a Simple, Fluid Card Grid Make a More Flexible Cover Screen with CSS Grid Can CSS Grid open up interesting CMS Layout options? Firefox 52 to Introduce New Box-Alignment Values Falling Forward — Rethinking Progressive Enhancement, Graceful Degradation and Developer Morality Start Exploring the Magic of CSS Grid Layout I Converted My Blog to CSS Grid Layout and Regret Nothing Feature Queries are on the Rise CSS Shapes — Let the Text Flow Around You Flexbox -- Let Memorializing Prince and Print vs. The Web I went to Italy and noticed UX fails How to Get Designers to Contribute in Open Source The True Gift of Your Former Code
Modern CSS: Four Things Every Developer and Designer Should Know About CSS
2018-03-19 · via Bryan Robinson's Blog

Many developers I talk to think the phrase “Modern CSS” is an oxymoron. If you haven’t been watching the growth and maturity of CSS in the past 5 years, you’re doing yourself a disservice. 

In this article, I’ll outline the four things that excite me every day about the state of CSS in 2018.

Layout is no longer hard with CSS Grid and Flexbox

Welcome to the new world order. Gone are the days of float-based layouts. Gone are the headaches of width calculations and hacks.

Unlike floats, the Flex and Grid specifications were written specifically for complex and fluid designs. 

Flexbox

The Flexible Box Module is a CSS Specification intended for fluid user interfaces. Take for example, the beginning of the Abstract from the specification:

The specification describes a CSS box model optimized for user interface design. In the flex layout model, the children of a flex container can be laid out in any direction, and can "flex" their sizes, either growing to fill unused space or shrinking to avoid overflowing the parent.

Flex makes layout of boxes in one direction uncomplicated. Beyond that, it codifies many of the design patterns we had used floats for. 

Want your three promotional spaces to always be the same height? The default value for align-items is stretch and makes this happen in zero lines of code.

Resources

CSS Grid

In 2017, our industry saw one of the fastest and most streamlined implementations of a new browser feature. CSS Grid went from zero support to 100% modern browser support in under a year. This is huge.

CSS Grid is a layout specification meant work together with Flexbox.

Where Flexbox works from the content out, Grid works from the layout in.

For the first time ever, we can specify a layout mode on the page and have our content reliably enter across TWO dimensions.

It’s little secret that I love CSS Grid. The majority of the posts I make on this site are about it. 

If you’ve ever wanted to stretch content across multiple rows without additional markup, this is your time. 

If you’ve ever wanted to place content in specific areas without the drawbacks of absolute positioning, this is your time.

If you’ve ever wanted to create refreshing, unique layouts, this is absolutely the time to be doing web design.

Resources

  • CSS Tricks’ A Complete Guide to Grid - Much like their guide to Flexbox, this is a great representation of Grid’s properties and values.
  • Grid by Example - Rachel Andrew’s Grid by Example is a great resource for learning Grid … by examples.
  • Five Design Fears to Vanquish with CSS Grid - My article on CSS Tricks for the design promise of Grid.
  • Learn CSS Grid - An older collection of resources on CSS Grid compiled by the amazing Jen Simmons.
  • Grid Garden - Learn the syntax of Grid with this fun browser game.
  • Grid Critters - Back for more from Flexbox Zombies, Dave Geddes created Grid Critters - a sci-fi grid mastery game. If you have an education budget, this is where you should spend it.

Graphical Manipulation is possible with filters and blend modes

Colors and effects used to be the purview of Photoshop or JavaScript. Now they’re a first-class citizen of CSS with filters and blend modes.

With CSS Blend Modes, web developers now have an opportunity to use image manipulation blend modes such as multiply and screen.

There are a lot of practical applications to this. There are also a lot of applications that will make designers very, very happy.

While writing this post, I got sidetracked and made this fun little example:

CSS Filters give developers a load of image manipulation options. Some of my favorites are contrast and hue-rotate.

From a practical perspective, there are quite a few hover state or overlay applications.

I was tempted and made a fun hover state for an image in a few lines of code:

Resources

Guard against the cascade, but don’t forsake it

There are many thought pieces written about CSS. Many of them center around the global nature of the cascade (the “C” in “CSS).

There’s a growing faction of developers who feel that the cascade has become a liability. It’s too easy for styles to bleed between components. I won’t argue that it IS easy for styles to leak in a global way, but the cascade is your friend.

It’s sometimes your friend that gets you into trouble, but that can make the most memories.

I won’t add to the thought piece clutter, except to say this:

Using the cascade for sensible global styles is at the forefront of a maintainable website. Encapsulated styles for components that don’t depend on global styles is also extremely important.

Finding the appropriate mix of global and scoped is the key. It’s also the key in many programming languages. 

I use a mix of strong, sensible global styles and BEM in my CSS. Other’s mileage may vary. Just remember, “Cascade” is not a dirty word.

Resources

CSS Selectors are more powerful than you know

I was chatting with a developer friend of mine a few months back. He was working through an issue in his CSS. Someone who is a great developer and quite good at CSS.

He wanted the ability in SASS to specify that an element didn’t meet a certain criteria.

“You know if this element is a .X but NOT .Y,” he said.

I looked at him a little confused. “What do you mean?”

He explained again. 

“Well, I don’t know about SASS on this, but have you tried a CSS :not selector?”

All this to say CSS is a HUGE area of expertise and even talented developers miss functionality.

In 2018, CSS selectors are more than element selectors, ID selectors and class selectors.

The :not selector is a great exclusionary selector. When you want all list items that are NOT active

li:not(.active) {
    color: red;
}

Sibling selectors are also quite powerful. There are adjacent siblings (siblings next to each other in the source) and general siblings (may be seperated by other siblings).

I use sibling selectors in this example of a CSS-only mobile navigation. Adjacent siblings are the basis for the “lobotomized owl” reset pattern * + *

If you’re only using classes to select you’re missing out on some fun.

Resources

CSS is Wonderful

CSS in 2018 is fun. It’s wonderful. If you’re not enjoying CSS right now, you’re not having enough fun in your work.

What are your favorite pieces of Modern CSS?