Ads
Tuesday, June 30, 2020
Clear today!
With a high of F and a low of 51F. Currently, it's 62F and Clear outside.
Current wind speeds: 10 from the Northeast
Pollen: 7
Sunrise: June 30, 2020 at 05:28PM
Sunset: July 1, 2020 at 08:21AM
UV index: 0
Humidity: 46%
via https://ift.tt/2livfew
July 1, 2020 at 10:01AM
New in Chrome: CSS Overview
Here’s a fancy new experimental feature in Chrome! Now, we can get an overview of the CSS used on a site, from how many colors there are to the number of unused declarations… even down to the total number of defined media queries.
Again, this is an experimental feature. Not only does that mean it’s still in progress, but it means you’ll have to enable it to start using it in DevTools.
- Open up DevTools (
Command
+Option
+I
on Mac;Control
+Shift
+I
on Windows) - Head over to DevTool Settings (
?
orFunction
+F1
on Mac;?
orF1
on Windows) - Click open the Experiments section
- Enable the CSS Overview option
And, oh hey, look at that! We get a new “CSS Overview” tab in the DevTools menu tray when the settings are closed. Make sure it’s not hidden in the overflow menu if you’re not seeing it.
Notice that the report is broken out into a number of sections, including Colors, Font info, Unused declarations and Media queries. That’s a lot of information available in a small amount of space right at our fingertips.
This is pretty nifty though, huh? I love that tools like this are starting to move into the browser. Think about how this can help us not only as front-enders but also how we collaborate with designers. Like, a designer can crack this open and start checking our work to make sure everything from the color palette to the font stack are all in tact.
The post New in Chrome: CSS Overview appeared first on CSS-Tricks.
from CSS-Tricks https://ift.tt/3eNXpo7
via IFTTT
Global and Component Style Settings with CSS Variables
The title of this Sara Soueidan article speaks to me. I’m a big fan of the idea that some CSS is best applied globally, and some CSS is best applied scoped to a component. I’m less interested in how that is done and more interested in just seeing that conceptual approach used in some fashion.
Sara details an approach where components don’t have too much styling by default, but have CSS custom properties applied to them that are ready to take values should you choose to set them.
For each pattern, I’ve found myself modifying the same properties whenever I needed to use it — like the font, colors (text, background, border), box shadow, spacing, etc. So I figured it would be useful and time-saving if I created variables for those properties, define those variables in the ‘root’ of the component, and ‘pass in’ the values for these variables when I use the pattern as I need. This way I can customize or theme the component by changing the property values in one rule set, instead of having to jump between multiple ones to do so.
Direct Link to Article — Permalink
The post Global and Component Style Settings with CSS Variables appeared first on CSS-Tricks.
from CSS-Tricks https://ift.tt/3gIkl9G
via IFTTT
Responsive Styling Using Attribute Selectors
One of the challenges we face when implementing class-based atomic styling is that it often depends on a specific breakpoint for context.
<div class="span-12"></div> <!-- we want this for small screens -->
<div class="span-6"></div> <!-- we want this for medium screens -->
<div class="span-4"></div> <!-- we want this for large screens -->
It’s common to use a prefix to target each breakpoint:
<div class="sm-span-12 md-span-6 lg-span-4"></div>
This works well until we start adding multiple classes. That’s when it becomes difficult to keep a track what relates to what and where to add, remove. or change stuff.
<div class="
sm-span-12
md-span-6
lg-span-4
sm-font-size-xl
md-font-size-xl
lg-font-size-xl
md-font-weight-500
lg-font-weight-700">
</div>
We can try to make it more readable by re-grouping:
<div class="
sm-span-12
sm-font-size-xl
md-span-6
md-font-size-xl
md-font-weight-500
lg-span-4
lg-font-size-xl
lg-font-weight-700">
</div>
We can add funky separators (invalid class names will be ignored):
<div class="
[
sm-span-12
sm-font-size-xl
],[
md-span-6
md-font-size-xl
md-font-weight-500
],[
lg-span-4
lg-font-size-xl
lg-font-weight-700
]">
</div>
But this still feels messy and hard to grasp, at least to me.
We can get a better overview and avoid implementation prefixes by grouping attribute selectors instead of actual classes:
<div
sm="span-12 font-size-lg"
md="span-6 font-size-xl font-weight-500"
lg="span-4 font-size-xl font-weight-700"
>
</div>
These aren’t lost of classes but a whitespace-separated list of attributes we can select using [attribute~="value"]
, where ~=
requires the exact word to be found in the attribute value in order to match.
@media (min-width: 0) {
[sm~="span-1"] { /*...*/ }
[sm~="span-2"] { /*...*/ }
/* etc. */
}
@media (min-width: 30rem) {
[md~="span-1"] { /*...*/ }
[md~="span-2"] { /*...*/ }
/* etc. */
}
@media (min-width: 60rem) {
[lg~="span-1"] { /*...*/ }
[lg~="span-2"] { /*...*/ }
/* etc. */
}
It may be a bit odd-looking but I think translating atomic classes to attributes is fairly straightforward (e.g. .sm-span-1
becomes [sm~="span-1"]
). Plus, attribute selectors have the same specificity as classes, so we lose nothing there. And, unlike classes, attributes can be written without escaping special characters, like /+.:?
.
That’s all! Again, this is merely an idea that aims to make switching declarations in media queries easier to write, read and manage. It’s definitely not a proposal to do away with classes or anything like that.
The post Responsive Styling Using Attribute Selectors appeared first on CSS-Tricks.
from CSS-Tricks https://ift.tt/2NGeLqS
via IFTTT
Five 5-minute Videos from Ethan on Design & Accessibility
I’ve been working with Aquent Gymnasium to produce a series of five short tutorial videos, which have been launching over the course of this past week. Since the last video just went live, I’m thrilled to share the whole list with you:
• Introduction to using VoiceOver on macOS
• Designing beautiful focus states
• Flexible and accessible typesetting
• Responsively designing with viewport units
• Designing beautiful and accessible drop caps
Five minutes is a real sweet spot for a how-to video. Ain’t no time to screw around. I loved every minute of these.
Direct Link to Article — Permalink
The post Five 5-minute Videos from Ethan on Design & Accessibility appeared first on CSS-Tricks.
from CSS-Tricks https://ift.tt/2VmducW
via IFTTT
Amazon Web Services launches a dedicated aerospace and satellite business
Amazon Web Services (AWS) is upping its space industry game with a dedicated business unit called Aerospace and Satellite Solutions (as first reported by the WSJ) that’s focused on space projects, including from customers like NASA, the U.S. military, and private space players including Lockheed Martin and others. AWS has already served satellite and space industry customers, including with its AWS Ground Station offering, which provides satellite communication and data processing as a service, helping customers bypass the need to set up their own dedicated ground stations when establishing their satellite networks and constellations.
The AWS segment will be led by retired Air Force Major General Glint Crosier, who was involved in the set up of the U.S. Space Force arm of the U.S. military. The choice of leadership is a good indicator of what the primary purpose of this unit will be: landing and serving large, lucrative customers mostly form the defense industry.
In a high-profile decision last year, AWS lost out on contract to provide cloud computing services to the Pentagon with an estimated value of up to $10 billion, with Microsoft’s Azure taking the win. Amazon has formally challenged the decision, and the proceedings resulting from that challenge are ongoing. But the contract loss was likely a wake-up call at AWS that it would need to do more in order to bolster its pipeline for dedicated defense agency contracts.
Cloud computing services for satellite and in-space assets is a potentially massive business over the next few years for the defense industry, particularly in the U.S., where part of the strategy of the Space Force and Department of Defense is shifting away from a reliance on large, aging geostationary satellites, and towards more versatile, affordable and redundant networks of small satellites that can be launched frequently and in a responsive manner.
A primary focus on defense customers doesn’t mean startups and smaller new space ventures won’t benefit; in fact, they should be just as able to take advantage of the cost benefits that will accrue from Amazon dedicated more resources to serving this segment as bigger players. In fact, AWS Ground Station already serves smaller startups including Capella Space, which announced today that it would be using AWS for its satellite command and control, as well as for providing data from its imaging satellites to its customers much faster and cheaper than is usually possible for satellite providers.
This new focus could help further defray hard costs that any satellite startup must incur like ground station setup – a much-needed relief as the COVID-19 situation continues to impact startups’ ability to raise, especially in frontier tech areas like space.
from Amazon – TechCrunch https://ift.tt/2Zngs1V
via IFTTT
Monday, June 29, 2020
Clear today!
With a high of F and a low of 62F. Currently, it's 76F and Clear outside.
Current wind speeds: 10 from the South
Pollen: 6
Sunrise: June 29, 2020 at 05:28PM
Sunset: June 30, 2020 at 08:21AM
UV index: 0
Humidity: 16%
via https://ift.tt/2livfew
June 30, 2020 at 10:01AM
Amazon Prime Video introduces ‘Watch Party,’ a social coviewing experience included with Prime
Amazon Prime Video is beginning to roll out a coviewing feature to Amazon Prime members in the U.S., the company announced today. The “Watch Party” feature, which is included at no extra cost with a Prime membership, allows participants to watch video content together at the same time with the playback synchronized to the host’s account.
The host of the cowatching session will be able to start, stop and pause the Watch Party as needed throughout the session, and those changes will also be synced to all participants’ devices instantly.
Each session can also support up to 100 participants — as long as those participants also have a Prime membership (or a Prime Video subscription) and are are watching from within the U.S.
While the video is playing, users can socialize with other participants through a built-in chat feature that supports both text and built-in emojis.
At launch, Watch Party is offered via Prime Video on the desktop and is supported across thousands of titles in the Prime Video SVOD (subscription video on demand) catalog. This includes the third-party content that comes with Prime as well as Amazon Originals like “Fleabag,” “The Marvelous Mrs. Maisel,” “Tom Clancy’s Jack Ryan,” “HANNA,” “Mindy Kaling’s Late Night,” “Donald Glover’s Guava Island,” “Troop Zero,” “The Big Sick,””The Boys,” “Homecoming,” “My Spy,” and others.
Titles available only for rent or purchase are not available within Watch Party at this time, Amazon says.
To get started with Watch Party, customers will click on the new Watch Party icon on the movie or show’s page on Prime Video desktop website. They’re then given a link they can share with friends and family however they want. Recipients who click the link will then join the session and be able to chat with others.
Amazon says the new feature was built as a native experience for Prime Video.
The company is the latest streaming service to roll out bulit-in support for coviewing — something that’s become a popular activity during the coronavirus pandemic as people are spending more time at home.
While the U.S. was sheltering in place under coronavirus lockdowns, a browser extension called Netflix Party went viral. Soon, all the streamers wanted in on this action. HBO, for example, partnered with the browser extension maker Scener to offer a “virtual theater” experience for cowatching that supports up to 20 people.
Hulu more recently launched its own native Watch Party feature for its “No Ads” subscribers on Hulu.com. Media software maker Plexa also rolled out cowatching support around the same time.
Amazon, however, had already offered a way to cowatch some of its Prime Video titles before today. Its game-streaming site Twitch had introduced Watch Parties this spring across over 70 Amazon Prime Video titles. The new native experience rolling out now offers a broader selection and has the potential to expand to more markets in the future.
If you don’t see Watch Party yet, you will have it soon as the feature is just now beginning to roll out more broadly.
Amazon wouldn’t comment on its future plans for Watch Party. When asked about the roadmap ahead, the company would only say that it introduces features when they’re ready for customers.
from Amazon – TechCrunch https://ift.tt/3i7qrky
via IFTTT
When Sass and New CSS Features Collide
Recently, CSS has added a lot of new cool features such as custom properties and new functions. While these things can make our lives a lot easier, they can also end up interacting with preprocessors, like Sass, in funny ways.
So this is going to be a post about the issues I’ve encountered, how I go around them, and why I still find Sass necessary these days.
The errors
If you’ve played with the new min()
and max()
functions, you may have ran into an error message like this when working with different units: “Incompatible units: vh
and em
.”
This is because Sass has its ownmin()
function, and ignores the CSS min()
function. Plus, Sass cannot perform any sort of computation using two values with units that don’t have a fixed relation between them.
For example, cm
and in
units have a fixed relation between them, so Sass can figure out what’s the result of min(20in, 50cm)
and doesn’t throw an error when we try to use it in our code.
The same things goes for other units. Angular units, for example, all have a fixed relation between them: 1turn
, 1rad
or 1grad
always compute to the same deg
values. Same goes for 1s
which is always 1000ms
, 1kHz
which is always 1000Hz
, 1dppx
which is always 96dpi
, and 1in
which is always 96px
. This is why Sass can convert between them and mix them in computations and inside functions such as its own min()
function.
But things break when these units don’t have a fixed relation between them (like the earlier case with em
and vh
units).
And it’s not just different units. Trying to use calc()
inside min()
also results in an error. If I try something like calc(20em + 7px)
, the error I get is, “calc(20em + 7px)
is not a number for min
.”
Another problem arises when we want to use a CSS variable or the result of a mathematical CSS function (such as calc()
, min()
or max()
) in a CSS filter like invert()
.
In this case, we get told that “$color: 'var(--p, 0.85)
is not a color for invert
.”
The same thing happens for grayscale()
: “$color
: ‘calc(.2 + var(--d, .3))
‘ is not a color for grayscale
.”
opacity()
causes the same issue: “$color
: ‘var(--p, 0.8)
‘ is not a color for opacity
.”
However, other filter
functions — including sepia()
, blur()
, drop-shadow()
, brightness()
, contrast()
and hue-rotate()
— all work just fine with CSS variables!
Turns out that what’s happening is similar to the min()
and max()
problem. Sass doesn’t have built-in sepia()
, blur()
, drop-shadow()
, brightness()
, contrast()
, hue-rotate()
functions, but it does have its own grayscale()
, invert()
and opacity()
functions, and their first argument is a $color
value. Since it doesn’t find that argument, it throws an error.
For the same reason, we also run into trouble when trying to use a CSS variable that lists at least two hsl()
or hsla()
values.
On the flip side, color: hsl(9, var(--sl, 95%, 65%))
is perfectly valid CSS and works just fine without Sass.
The exact same thing happens with the rgb()
and rgba()
functions.
Furthermore, if we import Compass and try to use a CSS variable inside a linear-gradient()
or inside a radial-gradient()
, we get another error, even though using variables inside conic-gradient()
works just fine (that is, if the browser supports it).
This is because Compass comes with linear-gradient()
and radial-gradient()
functions, but has never added a conic-gradient()
one.
The problems in all of these cases arise from Sass or Compass having identically-named functions and assuming those are what we intended to use in our code.
Drat!
The solution
The trick here is to remember that Sass is case-sensitive, but CSS isn’t.
That means we can write Min(20em, 50vh)
and Sass won’t recognize it as its own min()
function. No errors will be thrown and it’s still valid CSS that works as intended. Similarly, writing HSL()
/ HSLA()
/ RGB()
/ RGBA()
or Invert()
allows us to avoid issues we looked at earlier.
As for gradients, I usually prefer linear-Gradient()
and radial-Gradient()
just because it’s closer to the SVG version, but using at least one capital letter in there works just fine.
But why?
Almost every time I tweet anything Sass-related, I get lectured on how it shouldn’t be used now that we have CSS variables. I thought I’d address that and explain why I disagree.
First, while I find CSS variables immensely useful and have used them for almost everything for the past three years, it’s good to keep in mind that they come with a performance cost and that tracing where something went wrong in a maze of calc()
computations can be a pain with our current DevTools. I try not to overuse them to avoid getting into a territory where the downsides of using them outweigh the benefits.
In general, if it acts like a constant, doesn’t change element-to-element or state-to-state (in which case custom properties are definitely the way to go) or reduce the amount of compiled CSS (solving the repetition problem created by prefixes), then I’m going to use a Sass variable.
Secondly, variables have always been a pretty small portion of why I use Sass. When I started using Sass in late 2012, it was primarily for looping, a feature we still don’t have in CSS. While I’ve moved some of that looping to an HTML preprocessor (because it reduces the generated code and avoids having to modify both the HTML and the CSS later), I still use Sass loops in plenty of cases, like generating lists of values, stop lists inside gradient functions, lists of points inside a polygon function, lists of transforms, and so on.
Here’s an example. I used to generate n
HTML items with a preprocessor. The choice of preprocessor matters less, but I’ll be using Pug here.
- let n = 12;
while n--
.item
Then I would set the $n
variable into the Sass (and it would have to be equal to that in the HTML) and loop up to it to generate the transforms that would position each item:
$n: 12;
$ba: 360deg/$n;
$d: 2em;
.item {
position: absolute;
top: 50%; left: 50%;
margin: -.5*$d;
width: $d; height: $d;
/* prettifying styles */
@for $i from 0 to $n {
&:nth-child(#{$i + 1}) {
transform: rotate($i*$ba) translate(2*$d) rotate(-$i*$ba);
&::before { content: '#{$i}' }
}
}
}
However, this meant that I would have to change both the Pug and the Sass when changing the number of items, making the generated code very repetitive.
I have since moved to making Pug generate the indices as custom properties and then use those in the transform
declaration.
- let n = 12;
body(style=`--n: ${n}`)
- for(let i = 0; i < n; i++)
.item(style=`--i: ${i}`)
$d: 2em;
.item {
position: absolute;
top: 50%;
left: 50%;
margin: -.5*$d;
width: $d;
height: $d;
/* prettifying styles */
--az: calc(var(--i)*1turn/var(--n));
transform: rotate(var(--az)) translate(2*$d) rotate(calc(-1*var(--az)));
counter-reset: i var(--i);
&::before { content: counter(i) }
}
This significantly reduces the generated code.
However, looping in Sass is still necessary if I want to generate something like a rainbow.
@function get-rainbow($n: 12, $sat: 90%, $lum: 65%) {
$unit: 360/$n;
$s-list: ();
@for $i from 0 through $n {
$s-list: $s-list, hsl($i*$unit, $sat, $lum)
}
@return $s-list
}
html { background: linear-gradient(90deg, get-rainbow()) }
Sure, I could generate it as a list variable from Pug, but doing so doesn’t take advantage of the dynamic nature of CSS variables and it doesn’t reduce the amount of code that gets served to the browser, so there’s no benefit coming out of it.
Another big part of my Sass (and Compass) use is tied to built-in mathematical functions (such as trigonometric functions), which are part of the CSS spec now, but not yet implemented in any browser. Sass doesn’t come with these functions either, but Compass does and this is why I often need to use Compass.
And, sure, I could write my own such functions in Sass. I did resort to this in the beginning, before Compass supported inverse trigonometric functions. I really needed them, so I wrote my own based on the Taylor series. But Compass provides these sorts of functions nowadays and they are better and more performant than mine.
Mathematical functions are extremely important for me as I’m a technician, not an artist. The values in my CSS usually result from mathematical computations. They’re not magic numbers or something used purely for aesthetics. A example is generating lists of clip paths points that create regular or quasi-regular polygons. Think about the case where we want to create things like non-rectangular avatars or stickers.
Let’s consider a regular polygon with vertices on a circle with a radius 50%
of the square element we start from. Dragging the slider in the following demo allows us to see where the points are placed for different numbers of vertices:
Putting it into Sass code, we have:
@mixin reg-poly($n: 3) {
$ba: 360deg/$n; // base angle
$p: (); // point coords list, initially empty
@for $i from 0 to $n {
$ca: $i*$ba; // current angle
$x: 50%*(1 + cos($ca)); // x coord of current point
$y: 50%*(1 + sin($ca)); // y coord of current point
$p: $p, $x $y // add current point coords to point coords list
}
clip-path: polygon($p) // set clip-path to list of points
}
Note that here we’re also making use of looping and of things such as conditionals and modulo that are a real pain when using CSS without Sass.
A slightly more evolved version of this might involve rotating the polygon by adding the same offset angle ($oa
) to the angle of each vertex. This can be seen in the following demo. This example tosses in a star mixin that works in a similar manner, except we always have an even number of vertices and every odd-indexed vertex is situated on a circle of a smaller radius ($f*50%
, where $f
is sub-unitary):
We can also have chubby stars like this:
Or stickers with interesting border
patterns. In this particular demo, each sticker is created with a single HTML element and the border
pattern is created with clip-path
, looping and mathematics in Sass. Quite a bit of it, in fact.
Another example are these card backgrounds where looping, the modulo operation and exponential functions work together to generate the dithering pixel background layers:
This demo just happens to rely heavily on CSS variables as well.
Then there’s using mixins to avoid writing the exact same declarations over and over when styling things like range inputs. Different browsers use different pseudo-elements to style the components of such a control, so for every component, we have to set the styles that control its look on multiple pseudos.
Sadly, as tempting as it may be to put this in our CSS:
input::-webkit-slider-runnable-track,
input::-moz-range-track,
input::-ms-track { /* common styles */ }
…we cannot do it because it doesn’t work! The entire rule set is dropped if even one of the selectors isn’t recognized. And since no browser recognises all three of the above, the styles don’t get applied in any browser.
We need to have something like this if we want our styles to be applied:
input::-webkit-slider-runnable-track { /* common styles */ }
input::-moz-range-track { /* common styles */ }
input::-ms-track { /* common styles */ }
But that can mean a lot of identical styles repeated three times. And if we want to change, say, the background
of the track, we need to change it in the ::-webkit-slider-runnable-track
styles, in the ::-moz-range-track
styles and in the ::-ms-track
styles.
The only sane solution we have is to use a mixin. The styles get repeated in the compiled code because they have to be repeated there, but we don’t have to write the same thing three times anymore.
@mixin track() { /* common styles */ }
input {
&::-webkit-slider-runnable-track { @include track }
&::-moz-range-track { @include track }
&::-ms-track { @include track }
}
The bottom line is: yes, Sass is still very much necessary in 2020.
The post When Sass and New CSS Features Collide appeared first on CSS-Tricks.
from CSS-Tricks https://ift.tt/2YJoT8K
via IFTTT
Styling Layout Wrappers In CSS
Two things that strike me often about the web are how many ways there are to go about the same thing and how many considerations go into even the most seemingly simple things.
Working with wrapper elements is definitely on both those lists. Wrappers (or containers or whatever) are so common — especially when establishing grid layouts and boundaries for the elements inside them — that it’s easy to take them for granted and reach for them without stepping back to consider how they work, why we use them, and how to use them effectively.
Ahmed Shadeed wrote up the most exhaustive article on wrappers I’ve ever read. He provides a brief overview of them before diving into a bunch of considerations and techniques for working with them, including:
- When to use them
- How to size them
- Positioning them
- Adding margin and padding
- Working with CSS grid and other
display
values - Breaking out of the wrapper
- Using CSS custom properties
If you take the images from the article, it tells a pretty cool story.
Direct Link to Article — Permalink
The post Styling Layout Wrappers In CSS appeared first on CSS-Tricks.
from CSS-Tricks https://ift.tt/2Z1I7pc
via IFTTT
Amazon warehouse workers strike in Germany over COVID-19 conditions
Amazon warehouse workers in Germany are striking for 48 hours this week, to protest conditions that have led to COVID-19 infections among fellow employees. Strikes began today at six warehouses and are set to continue through end of day Tuesday.
The company has drawn international criticism for its decision not to disclose official COVID-19 infection rates among workers, but a representative for Berlin-based labor union Verdi (Vereinte Dienstleistungsgewerkschaft or German United Services Trade Union) says they’re aware of “at least 30 to 40” workers in the Bad Hersfeld factory in Central Germany who have been infected with the virus.
Other striking factories include Koblenz, Leipzig, Rheinberg and Werne. Germany represents Amazon’s largest non-U.S. market, and is one that has seen its fair share of worker protests. Strikes were planned for Prime Days in both 2018 and 2019. But the COVID-19 pandemic represents a new challenge for the online retail giant.
As it has done with other recent criticism, the company denied suggestions that its working conditions are unsafe and pointed to various COVID-19-related initiatives.
“The majority of our associates does not participate and we see no impact on customer orders. The fact that more than 8,000 of our over 13,000 permanent associates in Germany are with us for more than five years proves that we are a fair employer,” a spokesperson said in a statement to TechCrunch. “Everything the union demands is already in place: Wages at the upper end from what is paid for similar jobs, career opportunities and a safe working environment,. The facts are: By end of June, we will have invested approximately $4 billion worldwide on COVID-related initiatives getting products to customers and keeping employees safe.”
Here in the States, the company has drawn criticism from media and politicians alike for its action on COVID-19, including the firing of multiple workers who have been vocally critical of its policies.
from Amazon – TechCrunch https://ift.tt/2ZjSG6X
via IFTTT
Book: The Greatest CSS Tricks Vol. I
Ya know, for a site called “CSS-Tricks” that I’ve run for well over a decade, it’s a little funny we’ve never done a book under that name. I’ve written a book about WordPress and SVG, but never CSS!
Well, allow me to change that. I’ve been working on a “book” called The Greatest CSS Tricks Vol. I, as my attempt to stay true to this site’s name! The big idea to make it like a coffee-table book for CSS, where each chapter is totally independent and talks about one literal CSS trick that I’ve found to be exceptionally clever and useful. A book about quite literally the best CSS tricks I’ve come across over the years.
I quoted the word “book” above because this is the loosest possible definition of a book. I have not yet made it into an eBook format. I have not even considered printing it yet (although there is a “full book” URL available with the whole book together for printing and print-to-PDFing). This book exists as URLs which are essentially fancy blog posts grouped together. I’m also calling it Volume I as there are already ideas for another one!
Some chapters are fairly broadly known concepts that I’m writing up to put a point on. But many of the chapters are based on ideas that can be traced back to individual people and I always try to credit them directly.
Here’s the chapter list so far:
- Pin Scrolling to Bottom
- Scroll Animation
- Yellow Flash
- Shape Morphing
- Flexible Grids
- Border Triangles
- Scroll Indicator
- Boxy Buttons
- Self-Drawing Shapes
- Perfect Font Fallbacks
- Scroll Shadows
- Editable Style Blocks
- Draggable Elements
- Hard Stop Gradients
- Squigglevision
I say so far because I might add a few and rearrange them and such, not to mention it could still use a healthy bit of editing. But I think the bulk of the value of the book is already there.
Value? I think so. While it’s fun to learn some CSS trickery, I think there is value beyond the tricks themselves. Tricks help you see how CSS works at a deeper level. When you understand the trick, you’re seeing how that part of CSS works through a new lens and it helps you be more in tune with the nature of that CSS. It will help you reach for those CSS properties more intuitively when you know what they are capable of.
In another sense, it’s like taking a walk with weights in your backpack. You do it on purpose so that when you walk normally, it feels easier. The tricks are like mental weights. They make writing non-tricky CSS feel easier.
So about buying the book. You don’t buy the book directly. What you buy is an MVP Supporter membership to this site. When you’re an MVP Supporter, you have access to the book, and more. This is the whole package:
- No Ads. You see no ads on this site, except for sponsored posts which are just blog posts and I try to make useful anyway.
- Extra Content. You can read the digital books I’m making (you can already read some chapters, but they are under progress.)
- Easier Commenting. You’ll be logged in, so leaving comments is easier and won’t require the delay for approval.
- Good feels. An extreme sense of satisfaction of supporting this site and our commitment to bringing you useful tech knowledge.
It’s just just $20/year.
Have I, or this site, helped you out over the years? This is the best way to say thanks.
Also, if you would really like to have access to read the book, and can’t afford it right now, I totally get it. Email me at chriscoyier@gmail.com and we can work that out.
The post Book: The Greatest CSS Tricks Vol. I appeared first on CSS-Tricks.
from CSS-Tricks https://ift.tt/2CSUEnt
via IFTTT
Amazon eliminates single-use plastic in packaging in India
Amazon said on Monday it has eliminated all single-use plastic in its packaging across its fulfillment centers in India, delivering on a pledge it made last year to achieve this goal by June.
The American e-commerce group said it had replaced packaging materials such as bubble wraps with paper cushions and was also using “100% plastic-free biodegradable” paper tapes. All of Amazon’s 50-plus fulfilment centers in India were complying with the new guidelines, the company said.
Flipkart, which had made a similar pledge last year, said last month that its reliance on single-use plastic across its supply chain had dropped by 50%. Last year, the Walmart-owned marketplace said it intended to move entirely to recycled plastic consumption in its supply chain by March 2021.
Amazon’s announcement Monday follows Indian Prime Minister Narendra Modi’s directive last year, when he urged Indians to put an end to usage of single-use plastic by 2022.
India has been grappling with a major plastic waste problem for several years. Asia’s third-largest economy is struggling with disposing of the 9.4 million tons of plastic waste it generates each year.
Dozens of nations across the world have in recent years moved to address this challenge by imposing curbs and levies on use of single-use plastic.
Amazon said today that it still uses some plastic in packaging material, but those are 100% recyclable through available collection, segregation and recycling channels. The company said it is continuing to educate sellers who fulfil customer orders to join in this nationwide change in packaging.
“Our aim is to minimize environmental impact while elevating customer experience. While navigating through unprecedented challenges with the lockdown and pandemic in the last few months, we have continued to take progressive steps towards ensuring that we meet our commitment,” said Prakash Kumar Dutta, Director of Customer Fulfilment & Supply Chain at Amazon India, in a statement.
Earlier this month, Amazon expanded Packaging-Free Shipping (PFS), an India-first initiative that sees fulfilment centers either deliver products that are completely packaging-free or have significantly reduced packaging, to over 100 cities in India. The company said more than 40% of its orders in India today are already using PFS.
Additionally, Amazon said it is also collecting and recycling plastic waste equivalent to its usage at a national level from September 2019, and has identified collection agencies to help collect equivalent 100% plastic waste generated from usage across the Amazon fulfilment network.
Earlier this month, Amazon announced it was launching a $2 billion internal venture-capital fund focused on technology investments to reduce the impact of climate change. The new fund, called The Climate Pledge Fund, will invest in firms across a number of industries, including transportation, energy generation, and manufacturing. Through the program, the companies aim to reach a goal of “net zero” carbon emissions by 2040.
from Amazon – TechCrunch https://ift.tt/388nZG0
via IFTTT
Sunday, June 28, 2020
Partly Cloudy today!
With a high of F and a low of 62F. Currently, it's 75F and Clear outside.
Current wind speeds: 7 from the East
Pollen: 7
Sunrise: June 28, 2020 at 05:28PM
Sunset: June 29, 2020 at 08:21AM
UV index: 0
Humidity: 33%
via https://ift.tt/2livfew
June 29, 2020 at 10:00AM
The Station: Amazoox, TuSimple seeks $250M and the next e-scooter battleground
The Station is a weekly newsletter dedicated to all things transportation. Sign up here — just click The Station — to receive it every Saturday in your inbox.
Hi friends and first-time readers. Welcome back to The Station, a newsletter dedicated to all the present and future ways people and packages move from Point A to Point B. I’m your host Kirsten Korosec, senior transportation reporter at TechCrunch.
Remember please reach out and email me at kirsten.korosec@techcrunch.com to share thoughts, criticisms, offer up opinions or tips. You can also send a direct message to me at Twitter — @kirstenkorosec.
Typically this space is where I philosophize about a specific event and emerging transportation trend. This week, let’s all take a pause to remember Jessi Combs, who was officially and posthumously declared to hold the fastest land speed record by a woman.
The Guinness Book of World Records certified this week the 522.783 mph land speed record that Combs achieved August 27, 2019 in the Alvord Desert in Oregon. Combs died after her vehicle crashed during that run. It’s the first time a new record has been set in this category in more than 40 years. Kitty O’Neil held the record with her 512.7 mph run set back in 1976.
Here’s to you Jessi, the fastest woman on earth.
Did anyone have trouble keeping up with all the deals, virtual automotive reveals and policy decisions this week? Yeah. Me too. Let’s get to it. Vamos.
Micromobbin’
A couple of cities are emerging as new battlegrounds for the shared e-scooter market. New York City is a biggie.
This week, the New York City Council approved a bill that will require the New York Department of Transportation to create a pilot program for the operation of shared electric scooters in the city. The DOT now has until October 15, 2020 to issue a request for proposals to participate in a shared e-scooter pilot program.
The pilot program must launch by March 1, 2021. The NY council will continue to work with DOT on determining where to set up the pilot (this is the important part). If the pilot program limits the service area it could prove a failure, several e-scooter companies and advocates told me. We know it won’t include Manhattan. That leaves four other boroughs.
Just about every e-scooter company — and a number of other less known players — are planning to apply for the permit. The next nine months promises a lot of lobbying activity. These firms are already busy, according to our sources. Stay tuned!
The NY city council also approved two laws about the use of privately owned electric bikes and scooters.
Meanwhile, Apple has finally added a new biking feature to Maps. The newest version of iOS is bringing a host of new features to Maps, including a dedicated cycling option that will optimize paths for bicyclists and even let users know if the route includes challenging hills. Apple Maps has included public transit and walking in previous iterations. But the biking option has been the most requested, according to Apple senior director Stacey Lysik.
Deal of the week
Amazoooooxxxxx. Zamazon? It’s a thing now. In case you missed it, Amazon acquired Zoox.
There have been rumors, speculation and reports about the fate of self-driving vehicle startup for months now. The WSJ had the first report in May that Amazon was in talks to acquire the self-driving company.
The official announcement, which was issued Friday morning, didn’t reveal much about the terms of the deal except that Zoox CEO Aicha Evans and co-founder and CTO Jesse Levinson will continue to lead Zoox as a standalone business.
As you might expect, there was nary a financial figure in sight. The Financial Times put the deal at $1.2 billion and The Information pegged it at “more than $1 billion.” Either way, the acquisition price was well below the $3.2 billion valuation Zoox had achieved two years before.
It wasn’t a secret that Zoox was struggling to raise a large enough round. As I’ve stated numerous times before, Zoox has the kind of ambitions that require a mountain of capital. And by mountain, I mean far north of $1 billion. The company isn’t just building the full self-driving stack — essentially the suite of hardware and software that replaces a human driver. It took on the design and development of a new bidirectional electric vehicle with no steering wheel and it plans to operate a ride-hailing service as well.
The upshot: Zoox didn’t have a lot of options. Many automakers, Tier 1 suppliers and tech companies had already formed their various alliances and partnerships, leaving Zoox on its own. Amazon certainly has the resources to help it hit its lofty goals. That is, IF Amazon doesn’t change those goals for Zoox. For now, Amazon is publicly sticking to Zoox’ mission to build and operate a fleet of robotaxis.
And we can expect more Amazon flexing in the transportation industry. The e-commerce announced this week a $2 billion Climate Pledge Fund to invest in sustainable technologies and services that will help the company reach its commitment to be net-zero carbon in its operations by 2040. Some of that coin will go towards automation and transportation.
Other deals that got our attention ….
Self-driving truck startup TuSimple has hired investment bank Morgan Stanley to help it raise $250 million, multiple sources told me. Morgan Stanley recently sent potential investors an informational packet, which I also viewed, that provides a snapshot of the company and an overview of its business model, as well as a pitch on why the company is poised to succeed. TuSimple has raised about $298 million with a valuation of more than $1 billion. Its backers include Sina, operator of China’s biggest microblogging site Weibo, Hong Kong-based investment firm Composite Capital, Nvidia, UPS, CDH Investments, Lavender Capital and Tier 1 supplier Mando Corporation.
ADAM CogTech, an Israeli automotive software startup, raised $2 million from Mobilion Ventures, the company said. Mobilion is an early-stage fund that invests in smart mobility, focusing on Israeli and global after-market innovation.
Amazon’s $575 million investment into UK food delivery startup Deliveroo has been cleared by the country’s competition regulator. The investment, which was announced more than a year ago, gave Amazon a 16% stake in Deliveroo. Now that CMA has provisionally cleared the deal, it is open for public comments until July 10. A final decision is expected August 6.
Cazoo, the British online used car marketplace, raised £25 million at a valuation in excess of $1 billion. Draper Esprit joined existing investors in the round, a group that includes DMG Ventures and General Catalyst. Cazoo has raised more than £200 million to date.
DriveU.auto, an Israeli startup that spun out of video transmission technology company LiveU, came out of stealth with $4 million in new funding. The startup has developed a connectivity platform for teleoperations. The funding round was led by RAD group co-founder Zohar Zisapel and included participation from Two Lanterns Venture Partners, Yigal Jacoby, Kaedan Capital and other private investors. Francisco Partners is an existing shareholder.
Lucid Motors gave up majority ownership to Saudi Arabia’s sovereign wealth fund in exchange for the $1.3 billion investment it closed last year, according to information disclosed in a new lawsuit, the Verge reported. Wired Middle East previously reported the PIF had taken a 67% stake. However, this is the first time an acknowledgment from the company has been made public.
Shift Technologies, an online used car marketplace, is in talks to merge with blank-check company Insurance Acquisition Corp., Bloomberg reported. Shift is aiming to be valued at more than $500 million in the deal.
Third Wave Automation, a startup developing autonomous forklift technology, emerged from stealth with $15 million in equity financing, VentureBeat reported.
Volkswagen is in talks to buy Europcar Mobility Group, the French car rental company that has a market capitalization of 390 million euros ($441 million) and net debt as of more than 1 billion euros, Reuters reported.
Truckin’
Trucks have popped up a lot this week, so I figured, heck let’s dig in a bit. The big trendy discussion is about how robotaxis are OUT and autonomous Class 8 trucks are IN. This move towards trucking has actually been happening for awhile now.
The niche subcategory in the autonomous vehicle industry was rather empty in 2015 when TuSimple was founded. Then self-driving truck startup Otto came along. Uber’s 2016 acquisition of Otto certainly brought some attention to the sector. But a number of other startups had also thrown their respective hats into the trucking ring, including Embark and the now defunct Starsky Robotics. Today, this sub-industry includes Ike, Kodiak Robotics and Waymo.
This week, Amazon-backed Aurora received some press for its “shift” to trucking based off of an interview with co-founder Sterling Anderson during The Information’s Autonomous Vehicle Summit.
Let’s be clear, the company has been publicly talking about trucks since at least October 2019. The notable bit is that Anderson shared more about its work with trucks and was clearly bullish on the potential in the marketplace. Together, his comments suggest that the company is prioritizing the development of autonomous trucks over cars.
But the company designed a full self-driving stack meant to have a variety of applications, not just passenger cars. In a tweet after the interview, Anderson summarized its whole approach.
We’re compelled by a product path that goes from middle mile to last mile to mobility services.
If you can swing this technically, it allows for an elegant transition from the largest market (today) with the best unit economics and lowest level of service requirements to smaller, but rapidly growing markets with more challenging unit economics and level of service needs”
In other truckin’ news …
The California Air Resources Board adopted a new rule to phase out the most polluting vehicles on the road today. The rule will require truck manufacturers to transition from diesel trucks and vans to electric zero-emission trucks beginning in 2024. By 2045, every new truck sold in California will be zero-emission.
Russian-Finnish company Zyfra is using 5G technology to replace Wi-Fi/mesh networks used for autonomous mining dump trucks, CNET’s Roadshow reports.
Notable reads and other tidbits
AVs, ride-hailing, electric vehicles and more!
Autonomous vehicles …
Didi Chuxing said Saturday (today) that its on-demand robotaxi service will start picking up riders in Shanghai, China. Passengers may start requesting on-demand rides for free on autonomous vehicles within a designated open-traffic area that covers Shanghai’s Automobile Exhibition Center, the local business districts, subway stations and hotels in downtown Shanghai, the company said in a press release.
Lyft is using data collected from drivers on its ride-hailing app to accelerate the development of self-driving cars. Lyft’s Level 5 self-driving car program is using the data to build 3D maps, understand human driving patterns and improve simulation tests. The program is taking data from select vehicles in its Express Drive program, which provides rental cars and SUVs to drivers on its platform as an alternative to options like long-term leasing
Waymo and Volvo Car Group announced Thursday an “exclusive” partnership to integrate Waymo’s self-driving software into a new electric vehicle designed for ride-hailing. Not a ton of detail about the deal or what “exclusive” means. We know that Volvo and Uber still have a partnership. The deal with Waymo involves integrating its self-driving stack into an “all-new mobility-focused electric vehicle platform for ride hailing services.” The partnership also includes other subsidiaries under Volvo Car Group, including electric performance brand Polestar and Lynk & Co. International, a point that Volvo Car Group CTO Henrik Green specifically noted in his prepared statement.
Mercedes-Benz and Nvidia announced a partnership to bring “software-defined” vehicles to market. The automaker’s next-generation vehicles will have a software-centric computing architecture based on Nvidia’s Drive AGX Orin computer system-on-a-chip. The underlying architecture will be standard in Mercedes vehicles, starting sometime toward the end of 2024.
It’s electric …
Apple has added a routing feature to Maps that’s designed for electric vehicle owners. The EV routing feature, which will be available in the newest version of iOS, will show charging stations compatible to a user’s electric vehicle along their route. TechCrunch’s Romain Dillet got a bit more information on this feature. He tells me that users will be able to enter their car model in the app, which will provide stops. The user can tap on the stops to see if the charging station is free or not. On sidenote, Apple is also releasing a feature that will prompt you to raise your phone and scan buildings across the street to refine your location. This feature is based on Look Around, a Google Street View-inspired feature that lets you look around as if you were walking down the street.
Arrival revealed a zero-emission bus, the next step in the company to become a major electric transportation company, the Verge reported.
Ars Technica digs into one Ohio city’s plan to get more people to buy electric cars. Hint: it worked.
Lordstown Motors unveiled an electric pickup truck prototype with four in-wheel hub motors and a few other features all aimed squarely at attracting contractors and other buyers in the commercial market. The Ohio startup didn’t get too deep into the details about the electric pickup truck known as Endurance. But we know a few more bits such as a $52,500 base price and some partnerships.
Tesla CEO Elon Musk said on Twitter that September 15 is the “tentative date” for the “Tesla Shareholder Meeting & Battery Day,” which will include the usual shareholder meeting as well as a tour of the automaker’s cell production system for the batteries that provide the power for its vehicles.
Speaking of Tesla … the National Highway Traffic Safety Administration has opened a preliminary investigation into allegations of failing touchscreens on Tesla’s older Model S vehicles.
Ride-hailing …
Lyft has agreed to settle a lawsuit from the U.S. Department of Justice that alleges the ridesharing company discriminated against disabled people — specifically those who use foldable wheelchairs or walkers.
Miscellaneous …
Alphabet’s Sidewalk Labs plans to spin out some of its smart city ideas into separate companies focused on mass timber construction, affordable electrification and planning tools optimized with machine learning and computation design, CEO Daniel Doctoroff said at Collision from Home conference, VentureBeat reported.
Ford’s Michigan Central is collaborating with Brooklyn-based Newlab to launch two “Innovation Studios” focused on solving complex transportation industry problems related to connectivity, autonomy and electrification. A corporate studio sponsored by Ford will kick off this summer to address macro mobility issues. A second civic studio will follow focusing on more immediate mobility issues in the neighborhoods around Michigan Central Station. In 2018, Ford acquired 1.2 million square feet in Corktown, Detroit’s oldest neighborhood, including the historic Michigan Central Station, with plans to establish a new mobility innovation district called Michigan Central. The first work spaces are expected to open within Michigan Central in 2022.
GM turned to 3D printing for a C8 Corvette prototype. In the end, 75% of the vehicle was 3D printed, Car and Driver reported.
See ya’ll next week!
from Amazon – TechCrunch https://ift.tt/2YCTxRg
via IFTTT
Saturday, June 27, 2020
Thunderstorms Early today!
With a high of F and a low of 57F. Currently, it's 70F and Partly Cloudy outside.
Current wind speeds: 12 from the South
Pollen: 7
Sunrise: June 27, 2020 at 05:27PM
Sunset: June 28, 2020 at 08:21AM
UV index: 0
Humidity: 42%
via https://ift.tt/2livfew
June 28, 2020 at 10:00AM
Friday, June 26, 2020
Partly Cloudy today!
With a high of F and a low of 57F. Currently, it's 63F and Fair outside.
Current wind speeds: 15 from the Northwest
Pollen: 7
Sunrise: June 26, 2020 at 05:27PM
Sunset: June 27, 2020 at 08:21AM
UV index: 0
Humidity: 70%
via https://ift.tt/2livfew
June 27, 2020 at 10:01AM
Quick Tips for High Contrast Mode
Sarah Higley has some CSS tricks up her sleeve for dealing with High Contrast Mode on Windows, which I learned is referred to as WHCM.
Here’s the first trick:
[…] if the default CSS outline property doesn’t give you the visual effect you want [in WHCM] for focus states, there’s a very simple fix. Instead of overriding default browser focus styles with
outline: none
, make it transparent instead:outline 3px solid transparent
.
That will essentially do nothing outside of WHCM, but in WHCM, it will be a thick white border, which is a strong, good visual focus style.
Direct Link to Article — Permalink
The post Quick Tips for High Contrast Mode appeared first on CSS-Tricks.
from CSS-Tricks https://ift.tt/2B8sZhs
via IFTTT
Mostly Clear today!
With a high of F and a low of 15F. Currently, it's 14F and Clear outside. Current wind speeds: 13 from the Southwest Pollen: 0 S...
-
So you want an auto-playing looping video without sound? In popular vernacular this is the very meaning of the word GIF . The word has stuck...
-
With a high of F and a low of 31F. Currently, it's 37F and Cloudy outside. Current wind speeds: 7 from the Northeast Pollen: 0 S...
-
Last year , we kicked out a roundup of published surveys, research, and other findings from around the web. There were some nice nuggets in ...