<?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: khaled Alshibani</title>
    <description>The latest articles on DEV Community by khaled Alshibani (@khaledsalshibani).</description>
    <link>https://dev.to/khaledsalshibani</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%2F1104398%2F55c886d3-e6ce-44f0-ac9e-a4fe75f6eb83.png</url>
      <title>DEV Community: khaled Alshibani</title>
      <link>https://dev.to/khaledsalshibani</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/khaledsalshibani"/>
    <language>en</language>
    <item>
      <title>The neverending nightmare of keeping code satisfying!</title>
      <dc:creator>khaled Alshibani</dc:creator>
      <pubDate>Wed, 16 Oct 2024 20:54:50 +0000</pubDate>
      <link>https://dev.to/khaledsalshibani/the-neverending-nightmare-of-keeping-code-satisfying-2947</link>
      <guid>https://dev.to/khaledsalshibani/the-neverending-nightmare-of-keeping-code-satisfying-2947</guid>
      <description>&lt;p&gt;&lt;strong&gt;TOC&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Explaining the problem (Options overwhelming)&lt;/li&gt;
&lt;li&gt;Real-life struggles from my experience&lt;/li&gt;
&lt;li&gt;Results! Is this good or bad?&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Explaining the problem (Options overwhelming)
&lt;/h2&gt;

&lt;p&gt;When you build a real application for the first time using a new language, technology, or framework while you're learning, things can get messy fast. It all starts with small questions, like whether you're putting files in the right place.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Then you get sucked into every little detail:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;searching for the “best” way to organize your directory tree.&lt;br&gt;
The problem then is that You find 10 different ways, each one claiming to be the best, how to name files, how to write clean code, how to name variables... and suddenly you’re even more confused!&lt;/p&gt;

&lt;p&gt;Before you know it, you're stuck figuring out your &lt;strong&gt;development workflow:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;where do you even start? Then comes testing, what kind of tests should you write? Should you automate them? Which tool is the best? And, of course, writing documentation brings on yet another part of confusion.&lt;br&gt;
It's perfectionism leading you to craziness!&lt;/p&gt;

&lt;p&gt;YES, perfectionism takes over, and it's enough to drive you crazy!&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-life struggles from my experience
&lt;/h2&gt;

&lt;p&gt;Every time I learn a new technology, it’s the same nightmare. This happened to me when I built my first full-stack app, then again when I created my first React app, and yet again when I worked with Next.js.&lt;/p&gt;

&lt;p&gt;Most recently, I went through this while building a component library. It started with the struggle of choosing the right tool. Firstly, I went with Stencil.js. But even during development, I kept questioning my choice, wondering why I didn’t go with Lit instead! Later on, I realized Stencil was the best choice for what I needed. &lt;strong&gt;These back-and-forths are frustrating, but they also make your decisions and satisfaction stronger as you go.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Results! Is this good or bad?
&lt;/h2&gt;

&lt;p&gt;In most cases, I’d say it’s good!&lt;/p&gt;

&lt;p&gt;Every time you learn something new, things often feel like a mess at first. Your code and logic might look pretty bad, but over time, you improve, refine, and make everything better bit by bit. And that’s the beauty of it. &lt;strong&gt;If you’re not going back to make things better, you may not be growing as a developer!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;However, there’s a downside too. If perfectionism drains your energy and productivity, it’s a sign to take a step back. You need to remind yourself that "&lt;strong&gt;The more issues you encounter and fix, the more you’re mastering your craft.&lt;/strong&gt;"&lt;/p&gt;




&lt;p&gt;No software or app was ever perfect from the start. &lt;strong&gt;Every great application evolves over time, and so will your skills.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Software Is Never Finished and Code Can Always Be Improved.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Software is never finished, only abandoned.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
    </item>
    <item>
      <title>Upcasting — Using a Superclass Reference for a Subclass Object</title>
      <dc:creator>khaled Alshibani</dc:creator>
      <pubDate>Fri, 11 Oct 2024 19:41:10 +0000</pubDate>
      <link>https://dev.to/khaledsalshibani/using-a-superclass-reference-for-a-subclass-object-22ga</link>
      <guid>https://dev.to/khaledsalshibani/using-a-superclass-reference-for-a-subclass-object-22ga</guid>
      <description>&lt;p&gt;Consider a scenario where we create a class named &lt;strong&gt;User&lt;/strong&gt; and then create a subclass that extends &lt;strong&gt;User&lt;/strong&gt; called &lt;strong&gt;Employee&lt;/strong&gt;.&lt;br&gt;
Typically, we create an instance of &lt;strong&gt;User&lt;/strong&gt; with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here &lt;code&gt;User&lt;/code&gt; is the type of the variable &lt;code&gt;user&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;user&lt;/code&gt; is the variable that holds the instance of the class.&lt;br&gt;
And &lt;code&gt;new User()&lt;/code&gt; creates a new instance of User.&lt;/p&gt;

&lt;p&gt;Simply put, the &lt;code&gt;user&lt;/code&gt; is an instance of &lt;code&gt;User&lt;/code&gt;.&lt;/p&gt;



&lt;p&gt;But what if the superclass &lt;strong&gt;User&lt;/strong&gt; needs to use methods defined in its subclass &lt;strong&gt;Employee&lt;/strong&gt;? Can this happen?&lt;br&gt;
The short answer is &lt;strong&gt;yes&lt;/strong&gt;, but only for overridden methods (methods that exist in both the superclass and the subclass). This is what enables polymorphism.&lt;br&gt;
Since the inheritance relationship is &lt;strong&gt;"is-a"&lt;/strong&gt; relationship, &lt;strong&gt;Employee is-a User&lt;/strong&gt;. so, nothing prevents &lt;strong&gt;User&lt;/strong&gt; from holding a reference to an instance of its subclass &lt;strong&gt;Employee&lt;/strong&gt;, as long as it is a compatible type.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is done as follows:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Employee&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let’s say the &lt;strong&gt;User&lt;/strong&gt; class has two methods: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;getUserName()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;getUserSalary()&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;while the &lt;strong&gt;Employee&lt;/strong&gt; class has an additional method called &lt;code&gt;getEmployeeInformation()&lt;/code&gt; and overrides the &lt;code&gt;getUserSalary()&lt;/code&gt; method.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Then with &lt;code&gt;User user = new Employee();&lt;/code&gt;:&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;user.getUserName()&lt;/code&gt; will work, as it's defined in the User class.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;user.getUserSalary()&lt;/code&gt; will also work, but the output will be from the overridden &lt;code&gt;getUserSalary()&lt;/code&gt; method in the &lt;strong&gt;Employee&lt;/strong&gt; class, not from the one in &lt;strong&gt;User&lt;/strong&gt;. This is the essence of polymorphism.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;user.getEmployeeInformation()&lt;/code&gt; will not work. It will throw a compilation error as it's specific to the &lt;strong&gt;Employee&lt;/strong&gt; class.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;A compilation error occurs when the compiler finds issues such as syntax errors, type mismatches, or other violations that prevent successful code compilation.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If we try to do the reverse and reference a subclass object &lt;strong&gt;Employee&lt;/strong&gt; with a superclass reference &lt;strong&gt;User&lt;/strong&gt;, it will not work without manual casting! This requires explicit casting, as &lt;strong&gt;User&lt;/strong&gt; is not necessarily an &lt;strong&gt;Employee&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Upcasting VS. Downcasting
&lt;/h2&gt;

&lt;p&gt;After simply explaining this, with a simple example, let's focus on the terms.&lt;/p&gt;




&lt;h3&gt;
  
  
  Upcasting
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;"Superclass reference to subclass object"&lt;/strong&gt; is typically called &lt;strong&gt;upcasting&lt;/strong&gt;. Simply put, upcasting is typecasting a child object to a parent object, and it happens &lt;strong&gt;implicitly&lt;/strong&gt; (&lt;em&gt;meaning the compiler handles it automatically, so we do not need any specific casting syntax&lt;/em&gt;). It's like when we did &lt;code&gt;User user = new Employee();&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  What About Downcasting?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Downcasting is the exact opposite of upcasting.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Remember when we said that creating an &lt;strong&gt;Employee&lt;/strong&gt; reference from a User instance is invalid? This is called &lt;strong&gt;downcasting&lt;/strong&gt;, and it must be done explicitly using casting syntax. While upcasting is very safe, &lt;strong&gt;downcasting&lt;/strong&gt; causes risks. This does not mean it's not useful, but it must be used with caution.&lt;/p&gt;

&lt;p&gt;I won’t go into too much detail about downcasting since this article is focused on upcasting, but the key point is showing the main difference between downcasting and upcasting.&lt;/p&gt;




&lt;p&gt;And that’s a wrap! :)&lt;/p&gt;

</description>
      <category>oop</category>
      <category>upcasting</category>
      <category>inheritance</category>
      <category>java</category>
    </item>
    <item>
      <title>How to Land Web Development Clients and Build a Successful Career</title>
      <dc:creator>khaled Alshibani</dc:creator>
      <pubDate>Thu, 14 Sep 2023 20:35:58 +0000</pubDate>
      <link>https://dev.to/khaledsalshibani/how-to-land-web-development-clients-and-build-a-successful-career-46kg</link>
      <guid>https://dev.to/khaledsalshibani/how-to-land-web-development-clients-and-build-a-successful-career-46kg</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;br&gt;
In the fast-paced world of web development, finding clients and establishing a successful career requires more than just technical skills. Clients won't magically appear at your doorstep, no matter how skilled you are. In this article, I'll delve into the strategies that can help you attract clients and build a thriving career in web development.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Build Your Online Presence:
&lt;/h2&gt;

&lt;p&gt;One of the first steps to attracting clients is building a strong online presence. In today's digital age, this is where potential clients are likely to discover you. &lt;strong&gt;Here's what you can do:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Networking is Key:&lt;/strong&gt; Networking isn't just about making connections, it's also about establishing trust. Engage with others in the web development community, share valuable content, and actively participate in relevant discussions on social media platforms.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Showcase Your Skills Through Your Work:
&lt;/h2&gt;

&lt;p&gt;To prove your expertise, you need a portfolio that speaks for itself. &lt;em&gt;Consider these points:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create Diverse Projects:&lt;/strong&gt; Develop at least four diverse projects that showcase your web development specialization. These projects should not only demonstrate your skills but also your versatility as a developer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quality Over Quantity:&lt;/strong&gt; It's not about the number of projects but the quality. Potential clients will assess your work based on the projects you've completed.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Consistently Share High-Quality Content:
&lt;/h2&gt;

&lt;p&gt;High-quality content not only attracts clients but also establishes you as an authority in your field. &lt;strong&gt;Here's how:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;** Share Valuable Insights:** Strive to provide valuable insights, tips, and tutorials related to web development. This demonstrates your expertise and commitment to the field.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;** Avoid Copy-Pasting:** Authenticity sets you apart from others. Avoid simply copying content from elsewhere; instead, provide your unique perspective.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. Continuously Improve Your Skills:
&lt;/h2&gt;

&lt;p&gt;Web development is a constantly evolving field. Staying updated with the latest trends and technologies is crucial:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stay Informed:&lt;/strong&gt; Keep up with the latest trends and technologies in web development. Share your knowledge with others, demonstrating your growth and expertise.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. Explore Freelancing Platforms:
&lt;/h2&gt;

&lt;p&gt;If your online presence alone isn't bringing in clients, consider leveraging freelancing platforms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Join Platforms:&lt;/strong&gt; Platforms like Upwork, Freelancer, and others connect freelancers with clients seeking specific skills. It can be a valuable way to find clients and projects.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
In the world of web development, skills alone won't guarantee success. Building a thriving career requires networking, a strong online presence, consistent quality work, ongoing skill development, and sometimes, the use of freelancing platforms. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remember&lt;/strong&gt;, patience and hard work are essential in this journey. By following these strategies, you can attract clients and pave the way for a prosperous web development career.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>development</category>
      <category>tutorial</category>
      <category>careerdevelopment</category>
    </item>
    <item>
      <title>Learn the Basics of CSS and How it Works</title>
      <dc:creator>khaled Alshibani</dc:creator>
      <pubDate>Sat, 15 Jul 2023 13:52:02 +0000</pubDate>
      <link>https://dev.to/khaledsalshibani/learn-the-basics-of-css-and-how-it-works-1di5</link>
      <guid>https://dev.to/khaledsalshibani/learn-the-basics-of-css-and-how-it-works-1di5</guid>
      <description>&lt;p&gt;CSS, short for Cascading Style Sheets, is an essential part of web development that allows you to control the visual appearance of your web pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  In this CSS beginner's guide, I will explore the fundamental concepts:
&lt;/h2&gt;

&lt;p&gt;1. What is CSS?&lt;br&gt;
2. CSS vs. CSS3. How do they differ?&lt;br&gt;
3. Is there a CSS2?&lt;br&gt;
4. Is CSS a programming language?&lt;br&gt;
5. Who should learn CSS?&lt;br&gt;
6. How CSS works?&lt;/p&gt;


&lt;h3&gt;
  
  
  1. What is CSS? &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyj02q2d9clm5lg528i82.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyj02q2d9clm5lg528i82.png" alt="What is CSS?" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
CSS is a language used to describe the presentation and styling of HTML documents. With it, you can define the styles of HTML elements, such as &lt;strong&gt;colors&lt;/strong&gt;, &lt;strong&gt;fonts&lt;/strong&gt;, &lt;strong&gt;sizes&lt;/strong&gt;, and spacings. CSS achieves this by using &lt;strong&gt;selectors&lt;/strong&gt;, &lt;strong&gt;properties&lt;/strong&gt;, and &lt;strong&gt;values&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Selectors&lt;/strong&gt; target specific HTML elements that you want to style, and they can be based on element types (&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;), class names (&lt;code&gt;.class-name&lt;/code&gt;), IDs (&lt;code&gt;#an-id&lt;/code&gt;), or other attributes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Properties&lt;/strong&gt; represent the aspects or characteristics of element styles that you want to modify. such as &lt;code&gt;color&lt;/code&gt;, &lt;code&gt;font-size&lt;/code&gt;, &lt;code&gt;background-color&lt;/code&gt;, and &lt;code&gt;margin&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values&lt;/strong&gt; are assigned to properties and define how the selected elements should appear. For instance, the value of the &lt;code&gt;color&lt;/code&gt; property can be &lt;code&gt;blue&lt;/code&gt;, and the value of the &lt;code&gt;font-size&lt;/code&gt; can be &lt;code&gt;18px&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;By combining these three parts, you create CSS &lt;strong&gt;rules&lt;/strong&gt; that instruct the browser on how to style elements. &lt;strong&gt;Here's an example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h1 { /* The Selector */
  color /* The Property */: blue  /* The Value*/;
  font-size: 18px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. CSS vs. CSS3. How do they differ? &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ksqlyivgad5lvkfsk9l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ksqlyivgad5lvkfsk9l.png" alt="CSS vs. CSS3. How do they differ?" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;CSS3&lt;/strong&gt; is an updated version of CSS that introduces new and improved features for web styling.&lt;/p&gt;

&lt;p&gt;With CSS3, you can achieve advanced effects like gradients, shadows, and animations. These enhancements provide greater flexibility and creative possibilities for designing modern and creative websites.&lt;/p&gt;

&lt;p&gt;CSS, on the other hand, refers to the earlier versions of CSS before CSS3. While CSS3 has become the most popular and widely used version of CSS, understanding the basic concepts of CSS is still essential as it forms the foundation for CSS3.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Is there a CSS2? &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flkof8nfbvoim1y68t260.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flkof8nfbvoim1y68t260.png" alt="Is there a CSS2?" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Yes&lt;/strong&gt;, there is a CSS2. It is a previous version of CSS that expanded the capabilities of CSS.&lt;br&gt;
CSS2 introduced important features like positioning, floats, and advanced selectors, which have influenced the development of CSS3.&lt;br&gt;
Although CSS2 has been largely replaced by CSS3, understanding its concepts is still valuable for maintaining and updating older web projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Is CSS a programming language? &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbd8jcueh63jkk5j0czva.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbd8jcueh63jkk5j0czva.png" alt="Is CSS a programming language?" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
It's important to clarify that CSS is a styling language, not a programming language.&lt;br&gt;
While programming languages involve logic and calculations, CSS focuses solely on the visual presentation of web elements. CSS complements HTML by specifying how elements should appear on the screen.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Who should learn CSS? &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv881wx4iwddmb2q82tmu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv881wx4iwddmb2q82tmu.png" alt="Who should learn CSS?" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
CSS is a crucial skill for web developers and designers. By learning CSS, you gain the ability to customize the visual aspects of web pages and create engaging user experiences.&lt;/p&gt;

&lt;p&gt;If you're involved in front-end development or want to design and develop web pages, learning CSS is a must.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. How CSS works? &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg70z0nobycm9wfm4i2st.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg70z0nobycm9wfm4i2st.png" alt="How CSS works?" width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;
Understanding how CSS works allows you to optimize your stylesheets and make informed decisions when it comes to styling and layout. &lt;strong&gt;Here is the process of how CSS works:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. HTML Parsing &amp;amp; Loading:&lt;/strong&gt; The browser parses the HTML document, creating a structured representation known as the Document Object Model (DOM).&lt;br&gt;
This step sets up the basic structure of the web page, including elements and their relationships.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. CSS Loading:&lt;/strong&gt; The browser loads external CSS files referenced in the HTML document, as well as any embedded or inline styles.&lt;br&gt;
These CSS files contain the instructions for styling the HTML elements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. CSS Parsing:&lt;/strong&gt; The browser interprets the CSS code, ensuring its syntax is correct and valid.&lt;br&gt;
The parsed CSS is then transformed into a structured representation known as the CSS Object Model (CSSOM), which the browser can understand.&lt;br&gt;
This representation organizes the CSS rules and properties.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. CSS Rule Matching:&lt;/strong&gt; Once the CSS rules are matched with the HTML elements, the browser combines the DOM structure, CSS styles, and any additional rendering instructions to generate the final layout of the web page.&lt;br&gt;
The browser calculates the size, position, and appearance of each element, taking into account the CSS properties specified.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Rendering:&lt;/strong&gt; After matching the CSS rules with the HTML elements, the browser proceeds to render the web page.&lt;br&gt;
It combines the DOM structure, CSS styles, and any additional rendering instructions to generate the final layout.&lt;br&gt;
This process includes calculating the size, position, and appearance of each element, including margins, paddings, borders, and backgrounds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Viewing:&lt;/strong&gt; Once the rendering is complete, the fully styled web page is displayed on the screen, allowing users to view and interact with it.&lt;br&gt;
At this stage, users can experience the visual design, interact with interactive elements, and explore the functionality provided by the web page.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;In conclusion&lt;/strong&gt;, CSS is an essential language for web developers and designers, allowing them to control the visual appearance of web pages.&lt;br&gt;
It provides the ability to style HTML elements using selectors, properties, and values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And remember that,&lt;/strong&gt; &lt;em&gt;CSS is not a programming language but focuses on styling rather than functionality.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>frontend</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Selecting CSS Classes Ending With The Same Name Using $= Operator</title>
      <dc:creator>khaled Alshibani</dc:creator>
      <pubDate>Sat, 08 Jul 2023 15:44:40 +0000</pubDate>
      <link>https://dev.to/khaledsalshibani/selecting-css-classes-ending-with-the-same-name-using-operator-2hji</link>
      <guid>https://dev.to/khaledsalshibani/selecting-css-classes-ending-with-the-same-name-using-operator-2hji</guid>
      <description>&lt;h2&gt;
  
  
  Did you know you can select all classes that end with the same name in CSS using the powerful $= operator?
&lt;/h2&gt;

&lt;p&gt;This technique is particularly useful when employing the &lt;strong&gt;BEM&lt;/strong&gt; methodology.&lt;/p&gt;

&lt;p&gt;Selecting multiple elements with the same class name in CSS can be time-consuming. Fortunately, the &lt;strong&gt;$= operator&lt;/strong&gt; allows us to select all classes that end with the same name.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;$= operator&lt;/strong&gt; enables us to select elements that have an attribute ending with a specific value. When applied to CSS classes, this means we can select all classes that end with the same name, regardless of the preceding characters.&lt;/p&gt;

&lt;p&gt;If you're utilizing the &lt;strong&gt;BEM&lt;/strong&gt; methodology, you'll likely have numerous classes that end with the same modifier name, such as &lt;strong&gt;card--green&lt;/strong&gt;, &lt;strong&gt;alert--green&lt;/strong&gt;, &lt;strong&gt;button--green&lt;/strong&gt;, and so on. The &lt;strong&gt;$=&lt;/strong&gt; operator permits you to select all classes ending with a particular string, as illustrated below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[class$="--green"] {
  /* CSS rules */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the example above, we're selecting all classes that end with &lt;strong&gt;--green&lt;/strong&gt; and assigning them a green background color.&lt;/p&gt;

&lt;p&gt;By employing the &lt;strong&gt;$=&lt;/strong&gt; operator` in CSS, you can effectively select and style all classes ending with the same name, resulting in cleaner and more maintainable code.&lt;br&gt;
Experiment with this technique in your projects to enhance organization and reduce redundancy.&lt;/p&gt;

&lt;p&gt;Check out the thread on Twitter: &lt;a href="https://twitter.com/khaleds_saif/status/1637129245016162306" rel="noopener noreferrer"&gt;Here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>frontend</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Learn about the @if control statement in SCSS</title>
      <dc:creator>khaled Alshibani</dc:creator>
      <pubDate>Tue, 04 Jul 2023 10:42:10 +0000</pubDate>
      <link>https://dev.to/khaledsalshibani/learn-about-the-if-control-statement-in-scss-3pop</link>
      <guid>https://dev.to/khaledsalshibani/learn-about-the-if-control-statement-in-scss-3pop</guid>
      <description>&lt;h2&gt;
  
  
  Level up your SCSS skills with flexible styles!
&lt;/h2&gt;

&lt;p&gt;Learn about the &lt;strong&gt;@if&lt;/strong&gt; control statement and its powerful role in creating dynamic designs that adapt to different conditions.&lt;/p&gt;

&lt;p&gt;Take a look at this example to easily understand the concept.⚡️&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fedpbb3dcv8p3jbqlwcje.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fedpbb3dcv8p3jbqlwcje.jpg" alt="Image description" width="800" height="618"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example, I'm defining a &lt;strong&gt;mixin&lt;/strong&gt; called &lt;em&gt;button-size&lt;/em&gt; that takes a single argument &lt;em&gt;$size&lt;/em&gt;.&lt;br&gt;
Using &lt;strong&gt;@if&lt;/strong&gt;, I'm applying different font sizes based on the value of the variable &lt;em&gt;$size&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;And to use this &lt;strong&gt;mixin&lt;/strong&gt;, simply include it in your button selector and pass a value for &lt;em&gt;$size&lt;/em&gt;, like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8bn4r70bcyii83y6qg53.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8bn4r70bcyii83y6qg53.jpg" alt="Image description" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With &lt;strong&gt;@if&lt;/strong&gt;, you'll have the ability to create versatile and reusable styles that adapt seamlessly to various button sizes. Apply the button-size &lt;strong&gt;mixin&lt;/strong&gt; to any button element, specifying the size as an argument.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/khaleds_saif" rel="noopener noreferrer"&gt;Follow Me On Twitter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>scss</category>
      <category>frontend</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
