<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: am i angie?</title>
    <description>The latest articles on DEV Community by am i angie? (@amiangie).</description>
    <link>https://dev.to/amiangie</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F175655%2Fba4c4e77-a64b-436b-9ad9-ee444d955c61.jpeg</url>
      <title>DEV Community: am i angie?</title>
      <link>https://dev.to/amiangie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amiangie"/>
    <language>en</language>
    <item>
      <title>A Quick and Dirty Intro to Web Accessibility</title>
      <dc:creator>am i angie?</dc:creator>
      <pubDate>Wed, 27 Nov 2024 09:45:43 +0000</pubDate>
      <link>https://dev.to/amiangie/a-quick-and-dirty-intro-to-web-accessibility-5g05</link>
      <guid>https://dev.to/amiangie/a-quick-and-dirty-intro-to-web-accessibility-5g05</guid>
      <description>&lt;p&gt;Accessibility is the inclusive practice of designing and coding websites to be usable by everybody. It helps to achieve the fundamental goal of the Web: to work for all people, whatever their hardware, software, language, location, or ability. Accessibility is often neglected, but it is a basic and fundamental part of work for anyone striving for technical excellence. If the mission doesn't inspire you, consider this: web accessibility is also required by law in many countries and situations, and there is a very real possibility that your client will get sued if their website is not accessible.&lt;/p&gt;

&lt;p&gt;International standards for web accessibility are developed by the World Wide Web Consortium (better known as W3C). An example of such a standard is Web Content Accessibility Guidelines (WCAG) that is developed by Web Accessibility Initiative (WAI) (&lt;a href="https://www.w3.org/WAI/about/participating/" rel="noopener noreferrer"&gt;where you can participate too&lt;/a&gt;!). Every once in a while WCAG is updated to reflect the latest changes in technologies and our understanding of accessibility needs.&lt;/p&gt;

&lt;p&gt;According to WCAG, web accessibility can be broken down into four main principles, commonly abbreviated as POUR. Any user interface component or a piece of information on the website must be &lt;em&gt;perceivable&lt;/em&gt; (adjusted to different ways users can see or hear your page), &lt;em&gt;operable&lt;/em&gt; (usable with devices other than mouse), &lt;em&gt;understandable&lt;/em&gt; (readable and consistent and predictable in behaviour), and &lt;em&gt;robust&lt;/em&gt; (compatible with a variety of different user agents, current and potential future ones).&lt;/p&gt;

&lt;p&gt;To summarise what each principle means in practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Perceivable&lt;/strong&gt;: no matter how a user is accessing the site, whether they're visually impaired and are using a screen reader or glasses, or hearing impaired and need captions for video content, they can receive all the information;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operable&lt;/strong&gt;: the site must function with various devices and inputs, not just a standard mouse and keyboard — so things like touch screen or even voice control;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Understandable&lt;/strong&gt;: the information is clear and easy to understand, and the user interface responds to user actions in a predictable way;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Robust&lt;/strong&gt;: the site is built following best practices for coding and design, and regular testing is conducted with different browsers, devices, and assistive technologies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Under each of these principles there are guidelines that address the principle, and under each guideline there are testable success criteria that describe what specifically must be achieved in order to conform to this standard. These criteria are organised into three levels of compliance: A (lowest), AA (the most reasonable and popular), and AAA (highest, not even recommended for entire sites by WCAG).&lt;/p&gt;

&lt;p&gt;A common misconception I encounter quite often is "we don't need accessibility, disabled people don't use our website anyway". First of all, of course they don't, if they literally &lt;em&gt;can't&lt;/em&gt;. But second and most importantly, accessibility is not only for disabled people — it's for everyone.&lt;/p&gt;

&lt;p&gt;Useful links and further reading:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/TR/WCAG22/" rel="noopener noreferrer"&gt;WCAG 2.2 guidelines&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/WAI/" rel="noopener noreferrer"&gt;WAI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>a11y</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Finch Front-End Day 1 Write-Up: Layout, Optimisation, and Organisation</title>
      <dc:creator>am i angie?</dc:creator>
      <pubDate>Fri, 27 Sep 2019 08:19:56 +0000</pubDate>
      <link>https://dev.to/amiangie/finch-front-end-day-1-write-up-layout-optimisation-and-organisation-4g18</link>
      <guid>https://dev.to/amiangie/finch-front-end-day-1-write-up-layout-optimisation-and-organisation-4g18</guid>
      <description>&lt;p&gt;Last month, I was fortunate enough to receive a free diversity ticket to one of the days of #FinchConf, a front-end conference held in Edinburgh. I've chosen to attend day one, focused on &lt;em&gt;Layout, Optimisation, and Organisation&lt;/em&gt;. Here are my notes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Jeremy Keith &lt;small&gt;(probably more famous as &lt;a class="comment-mentioned-user" href="https://dev.to/adactio"&gt;@adactio&lt;/a&gt;
)&lt;/small&gt; on Going Offline
&lt;/h2&gt;

&lt;p&gt;The web has come a long way. Websites used to be static pages, which changed with the rise of JavaScript and then AJAX (which actually stands for &lt;em&gt;Ask Jeremy About XML&lt;/em&gt;, true story). After we started doing stuff in JS, over time some of the things like &lt;code&gt;:hover&lt;/code&gt; actually came down to declarative HTML/CSS languages, leaving JS for something more fun. &lt;/p&gt;

&lt;p&gt;(And look where it led us. If twenty-aughts were all about “lets use more JS”, 2019 is more like “can we &lt;em&gt;please&lt;/em&gt; tone it down with JS already”.)&lt;/p&gt;

&lt;p&gt;We had a couple of paradigm shifts along the way, too. One came with jQuery, which ultimately changed the way we manipulate the DOM. The other might be coming now, with the rise of service workers. &lt;/p&gt;

&lt;p&gt;Jeremy described &lt;strong&gt;service worker&lt;/strong&gt; (SW) as a &lt;strong&gt;“man-in-the-middle attack on your own website”&lt;/strong&gt;, which I think is quite brilliant. Indeed, after SW is installed on a device, it acts as an interceptor for network calls, which allows us to do all kinds of things like re-routing a request from going all the way to the server to look in cache at hand instead.&lt;/p&gt;

&lt;p&gt;Considering we now have two possible sources - remote server and local cache, - there can be different strategies for implementing service workers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Cache first&lt;/em&gt;, which basically means “if you have a resource saved in cache, use it, and skip the network call”;&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Network first&lt;/em&gt;, or “try fetching the resource from server first, and if something goes wrong, get it from cache, or if you don't have it in cache, &lt;em&gt;show a specifically designed offline page&lt;/em&gt;”.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Which one to use is up to you. Think about what content are you working with: most likely, styles can be cached, but a list of available products has to be fresh. We also don't have to decide everything for ourselves, and can offer choice to &lt;em&gt;save the content for offline use&lt;/em&gt; to the user, as Sara Soueidan does on &lt;a href="https://www.sarasoueidan.com/blog/"&gt;articles&lt;/a&gt; on her website.&lt;/p&gt;

&lt;p&gt;Jeremy showed how easy it is to start using service workers. If you understand the &lt;strong&gt;general logic&lt;/strong&gt;, you can implement them. There is no need for fancy frameworks or libraries, a couple of lines of JavaScript will do the trick. Throw in a manifest, which is a simple JSON file — and you have a PWA. You don't need to have a “web app” for this to work: having a &lt;em&gt;website&lt;/em&gt; is perfectly fine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rachel Andrew &lt;small&gt;(no, seriously, &lt;em&gt;the&lt;/em&gt; Rachel Andrew)&lt;/small&gt; on CSS Layouts
&lt;/h2&gt;

&lt;p&gt;If there's a motto for CSS Working Group, it's this: We can't break the web. No, really, we can't. We have to make sure every website, no matter how old, still works as expected after spec changes.&lt;/p&gt;

&lt;p&gt;That's one of the reasons why spec writing is hard.&lt;/p&gt;

&lt;p&gt;And yet, we still have a lot of new things in CSS, the biggest ones being, of course, flexbox and Grid. &lt;/p&gt;

&lt;p&gt;If you think Rachel gave a once and for all answer to “should I use flex or should I use grid” question, you're wrong. Instead, she asked: “Well, does it work?”, and proceeded with an in-depth explanation of block formatting contexts (every time you set &lt;code&gt;display&lt;/code&gt; property, you create a new &lt;a href="https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context"&gt;block formatting context&lt;/a&gt;), two-value &lt;code&gt;display&lt;/code&gt; properties (when you say &lt;code&gt;display: grid&lt;/code&gt;, what you are &lt;em&gt;really&lt;/em&gt; saying is &lt;code&gt;display: block grid&lt;/code&gt;, first value for container, the second value for its children), and logical dimensions (&lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt; don't make much sense if document flow goes from right to left, do they?).&lt;/p&gt;

&lt;p&gt;Rachel’s talk was &lt;em&gt;packed&lt;/em&gt; with information. If you want to learn more about this, here are some articles by Rachel herself to dig into: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.smashingmagazine.com/2018/03/understanding-logical-properties-values/"&gt;Understanding Logical Properties and Values&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.smashingmagazine.com/2019/04/display-two-value/"&gt;Digging Into The Display Property&lt;/a&gt; series&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  David Khourshid on Stateful Styles
&lt;/h2&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--kkIzey0b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/619677584805208064/RwwbnNpi_normal.jpg" alt="David K. 🎹 profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        David K. 🎹
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/davidkpiano"&gt;@davidkpiano&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      &lt;a href="https://twitter.com/markdalgleish"&gt;@markdalgleish&lt;/a&gt; Designer: *presents beautiful, high-fidelity app screen mockup*&lt;br&gt;&lt;br&gt;Developer: cool, this is one of... 1,208 possible states this app screen can be in... and we need an iOS and Android mockup too&lt;br&gt;&lt;br&gt;Designer: I will start working on the second screen then!
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      23:00 PM - 01 Sep 2019
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1168297572383019009" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1168297572383019009" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      36
      &lt;a href="https://twitter.com/intent/like?tweet_id=1168297572383019009" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      214
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;p&gt;Personally, I almost never get &lt;em&gt;all&lt;/em&gt; the designs from UI department. A button or a link will most probably only have two states: regular and &lt;code&gt;:hover&lt;/code&gt;; it's rare when &lt;code&gt;:focus&lt;/code&gt; and &lt;code&gt;:active&lt;/code&gt; are also provided. Every single link or button on the web have these states, and yet they are still forgotten. But your website or app can have a lot of custom states as well, eg “Fetching information from back-end” state, or “Loading” state, or “Success” state, or “Error” state. &lt;/p&gt;

&lt;p&gt;That's a lot of states.&lt;/p&gt;

&lt;p&gt;David talked about how using &lt;em&gt;finite state machines and statecharts&lt;/em&gt; can make life easier for everyone involved. Business will have a clear overview of application flows, designers will know what screens are missing, developers will know what to implement.&lt;/p&gt;

&lt;p&gt;David suggests to start development in old-fashioned way: with pencil and a piece of paper, in order to draw &lt;em&gt;statechart&lt;/em&gt; for the app. It will define &lt;em&gt;which states the app can be in&lt;/em&gt;, and &lt;em&gt;what events can lead to transition between different states&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;In code, the diagram can be represented as a simple object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;machine&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;initial&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;idle&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;states&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;idle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;CLICK&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;loading&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;RESOLVE&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;success&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;REJECT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;error&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;success&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;CLICK&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;loading&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;CLICK&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;loading&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Getting the next state then is as easy as getting the value from this object:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;transition&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;machine&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;states&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;To tie JavaScript and CSS, David suggests using &lt;code&gt;data-*&lt;/code&gt; attributes instead of classes. Not only they are &lt;em&gt;designed&lt;/em&gt; to hold custom application data, but they are also easy to manipulate via JS and fully accessible in CSS.&lt;/p&gt;

&lt;p&gt;If this topic if something you find interesting and want to dig deeper into, here are some links: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;David's &lt;a href="https://xstate.js.org/"&gt;XState library&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.inf.ed.ac.uk/teaching/courses/seoc/2005_2006/resources/statecharts.pdf"&gt;Statecharts: A Visual Formalism For Complex Systems&lt;/a&gt; by David Harel;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://rauchg.com/2015/pure-ui"&gt;Pure UI&lt;/a&gt;, by Guillermo Rauch.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chen Hui Jing on Devtools and Using Them to Understand and Learn Modern CSS
&lt;/h2&gt;

&lt;p&gt;Modern CSS can be hard to bend your mind around when reading about it. We have a whole new layout system built-in now, and with it a whole bunch of new units, and the only way to really grasp it all is to play around with it - and here's where browser's devtools can help, showing the layout and the computed values for any selected element.&lt;/p&gt;

&lt;p&gt;Hui Jing's slides for Finch are not up yet, but you can poke around their &lt;a href="https://www.chenhuijing.com/slides/65-connectfest-2019/"&gt;slides for ConnectFest&lt;/a&gt; or &lt;a href="https://blog.logrocket.com/examining-squishiness-in-intrinsic-web-design-1005d30dda0c/"&gt;examples for &lt;em&gt;Examining “squishiness” in Intrinsic Web Design&lt;/em&gt; article&lt;/a&gt; - and when I say “poke”, I mean “inspect different elements while resizing browser window like a hundred times to see how different values of different properties behave in different screen sizes, eg observe the difference between &lt;code&gt;auto-fill&lt;/code&gt; and &lt;code&gt;auto-fit&lt;/code&gt; (spoiler: the first one preserves space for empty “imaginary” columns while the second doesn't), and click on everything you haven't ever clicked on in devtools in browser of your choice”.&lt;/p&gt;

&lt;h2&gt;
  
  
  Harry Roberts on Those Small Properties You Can Add to Resource Links in &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; to Make Page Faster
&lt;/h2&gt;

&lt;p&gt;Not much to add there. &lt;a href="https://www.w3.org/TR/resource-hints/"&gt;Resource hints&lt;/a&gt; are a simple thing to implement, and they make page faster, - use them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Léonie Watson on Talking Technology
&lt;/h2&gt;

&lt;p&gt;Screen reader users rely on machines to read out content, and the result is... boring. Yet there isn't much we can do about it, not on the web, at least - sadly, CSS Speech module has been retired due to lack of interest in implementation from browser vendors. &lt;/p&gt;

&lt;p&gt;Shame!&lt;/p&gt;

&lt;p&gt;We could have had amazing things, like control over voice, volume, and speaking rate, to make our websites more expressive not only visually, but also verbally. &lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.w3.org/TR/css3-speech/"&gt;spec for CSS Speech&lt;/a&gt; is still there, so maybe one day it will be implemented. In the meanwhile, semantic HTML is free, and it makes real lives easier. Please, ditch endless &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s and &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s in favour of semantic elements 💛&lt;/p&gt;




&lt;p&gt;All in all, I loved Finch. Every talk was great in its own way, and it's incredible how many famous speakers there were in one place. I overheard that it was a tough conf to organise, and there weren't many attendees - but I'm very grateful it still happened. &lt;/p&gt;

&lt;p&gt;Happy coding, and gods bless. &lt;/p&gt;

</description>
      <category>frontend</category>
      <category>webdev</category>
      <category>finchconf</category>
      <category>css</category>
    </item>
    <item>
      <title>10x CSS</title>
      <dc:creator>am i angie?</dc:creator>
      <pubDate>Wed, 14 Aug 2019 19:49:24 +0000</pubDate>
      <link>https://dev.to/amiangie/10x-css-50ge</link>
      <guid>https://dev.to/amiangie/10x-css-50ge</guid>
      <description>&lt;p&gt;Let's get this straight: CSS is messy. It's a beautiful language that allows web to flourish - but it can get very dirty very fast. One of the reasons is the nature of the language itself: it's resilient, it's very forgiving - and it doesn't force almost any rules on you. &lt;/p&gt;

&lt;p&gt;You can use tabs. You can use spaces. You can write everything in one line. You can repeat the same ruleset over and over again, each time adding one new declaration. You don't even need to have &lt;em&gt;all&lt;/em&gt; the semicolons. This is your world, you can do whatever you want.&lt;/p&gt;

&lt;p&gt;But should you?&lt;/p&gt;

&lt;p&gt;Unlike painting, I don't think your CSS code is a place to get crazy. &lt;/p&gt;

&lt;p&gt;There has been a lot of talk over the years about large-scale CSS architecture, and now we have all sorts of methodologies like BEM, SMACSS, and, my personal weapon of choice, Atomic OOBEMITSCSS. But none of them deal with the smaller scale, where most of our actual work is done.&lt;/p&gt;

&lt;p&gt;I'm talking about single rulesets.&lt;/p&gt;

&lt;p&gt;As said before, nothing stops you from writing declarations in any way or order you want. One might argue it doesn't matter, if it gets the job done; but as for any other language, better code style in CSS leads to better DX, better code quality, and fewer bugs. &lt;/p&gt;

&lt;p&gt;So, lo and behold, my personal approach to lower-scale CSS structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.classname {
    /* is this thing even visible? */
    display: block;

    /* where is it on the page? */
    position: absolute;
    top: 0;
    left: 0;
    width: 20%;
    height: 300px;

    /* what does its content look like? */
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    font-style: italic;
    text-align: center;
    text-transform: uppercase;
    color: rebeccapurple;

    /* what's its box model? */
    padding: 10px 0;
    margin: 20px;
    border: 2px dashed salmon;
    border-radius: 5px;

    /* backgrounds, 'cause declarations tend to get so very long */
    background: url(someawesomepic.jpg) center center no-repeat;
    background-size: cover;

    /* purely a e s t h e t i c s */
    transition: all .25s;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;While by no means complete, this example covers the most frequent properties one usually has to define. No matter what, some declarations stick together, because &lt;em&gt;together they make more sense&lt;/em&gt;: width and height, border and border-radius, font- and text- properties, positioning properties, and so on. &lt;/p&gt;

&lt;p&gt;I have been following more-or-less this structure for almost a decade now, and it has made my life much easier. I only need a glance at any given ruleset to understand what's going on, what's missing, and spot some minor bugs like duplicates or declarations that will never actually be applied. &lt;/p&gt;

&lt;p&gt;It might seem as if I'm arguing that my system is great - and while it obviously is, what I think is the most important here is to actually &lt;em&gt;have&lt;/em&gt; one. It is hard to follow a story when it's all over the place, and it's very hard to work with code like that.&lt;/p&gt;

&lt;p&gt;Happy coding, and gods bless.   &lt;/p&gt;

</description>
      <category>css</category>
      <category>codequality</category>
      <category>codestyle</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
