SlideShare a Scribd company logo
1 of 21
How to use SASS
Tips and tricks
Ali Ramadan
 Variables
 Nesting
 Mixins
 Functions
 Imports
 Control Directives: @if, @for, and @each
‫ال‬ ‫اضافة‬
@media
‫ال‬ ‫داخل‬
class
‫فى‬
scss
How can we benefit?
‫داخل‬ ‫استخدامها‬ ‫يمكن‬ ‫ال‬
class
‫نستخدمها‬
‫مع‬
_name.scss
Organization only
‫ي‬
‫تجاهل‬ ‫تم‬
_name
‫مترجمات‬ ‫قبل‬ ‫من‬ ً‫ة‬‫عاد‬
SCSS
‫ملف‬ ‫إلى‬ ‫صريح‬ ‫بشكل‬ ‫استيرادها‬ ‫يتم‬ ‫لم‬ ‫ما‬
SCSS
‫آخر‬
.
‫السفلية‬ ‫الشرطة‬ ‫استخدام‬ ‫يشير‬
_
‫ملف‬ ‫اسم‬ ‫قبل‬
SCSS
‫مستقل‬ ‫بشكل‬ ‫ترجمتها‬ ‫يجب‬ ‫وال‬ ‫أخرى‬ ‫ملفات‬ ‫من‬ ‫جزء‬ ‫هي‬ ‫الملفات‬ ‫هذه‬ ‫أن‬ ‫إلى‬
.
‫يتم‬ ،‫ذلك‬ ‫من‬ ً‫ال‬‫بد‬
‫ملفات‬ ‫إلى‬ ‫استيرادها‬
SCSS
‫أخرى‬
.
‫تنظيم‬ ‫في‬ ‫يساعد‬ ‫هذا‬
‫الكود‬
‫يجعل‬ ‫مما‬ ،
‫ال‬
refactor
‫أسهل‬ ‫والفهم‬
.
‫مثل‬ ،‫االستخدام‬ ‫إلعادة‬ ‫قابلة‬ ‫مكونات‬ ‫على‬ ‫تحتوي‬ ‫أن‬ ‫يمكن‬
mixins
‫والمتغيرات‬
.
How can we benefit?
‫داخل‬ ‫استايالت‬ ‫نستخدم‬
class
‫ملف‬ ‫فى‬
scss
‫اخر‬
$var
Mixin
Partials
!global
How can we benefit?
‫من‬ ‫بدل‬ ‫استخدامها‬
root
‫الصياغه‬ ‫و‬ ‫الكتابه‬ ‫فى‬ ‫اسهل‬ ‫لاللوان‬
‫الغامق‬ ‫و‬ ‫منهم‬ ‫الفاتح‬ ‫االلوان‬ ‫لدرجات‬ ‫استخدامها‬
How can we benefit?
‫من‬ ‫القيم‬ ‫تمرير‬ ‫يمكن‬
twig
‫لل‬ ‫داتا‬ ‫امرر‬ ‫عايز‬ ‫كنت‬ ‫انى‬ ‫كده‬ ‫قبل‬ ‫مشكله‬ ‫فى‬ ‫كان‬
after
How can we benefit?
‫القيم‬ ‫تمرير‬ ‫يمكن‬
‫باالستايل‬ ‫الخاصه‬
‫من‬
twig
‫من‬ ‫بدال‬ ‫االحيان‬ ‫بعض‬ ‫فى‬ ‫استخدامها‬ ‫يمكن‬ ‫و‬
js
‫الضافة‬
class
‫ل‬ ‫معين‬
div
In compiler
‫ال‬ ‫عند‬ ‫اسهل‬
compiler
‫لملف‬ ‫بالنسبه‬
css
‫استخدامها‬ ‫يمكن‬
‫مع‬
.class
‫ايضا‬
‫إلى‬ ‫ترجمتها‬ ‫تتم‬ ‫ال‬ ‫خاصة‬ ‫محددات‬
CSS
‫ما‬
‫صراحة‬ ‫إليها‬ ‫اإلشارة‬ ‫يتم‬ ‫لم‬
‫إلعادة‬ ‫القابلة‬ ‫األنماط‬ ‫لتحديد‬ ‫مفيدة‬
‫إخراجها‬ ‫في‬ ‫ترغب‬ ‫ال‬ ‫التي‬ ‫االستخدام‬
‫إلى‬ ‫مباشرة‬
CSS
‫ال‬ ‫فى‬ ‫افضل‬
performance
‫كبيره‬ ‫بدرجه‬ ‫الكود‬ ‫هذا‬ ‫تحسين‬ ‫يمكن‬
How can we benefit?
‫داخل‬ ‫استايالت‬ ‫نستخدم‬
file
‫استخدامها‬ ‫و‬ ‫اساسى‬
‫طريق‬ ‫عن‬
include
‫فيه‬ ‫يوجد‬ ‫ملف‬ ‫استخدام‬ ‫يمكن‬
mixin global
‫يمكن‬
‫ثيم‬ ‫كل‬ ‫مع‬ ‫نسخه‬
ex
How can we benefit?
text and bg if bg dark text white
Hover button
Saturate
‫اللون‬ ‫تشبع‬ ‫لزيادة‬
deSaturate
‫اللون‬ ‫تشبع‬ ‫النقاص‬
Grayscale
‫ال‬ ‫الى‬ ‫اللون‬ ‫تشبع‬ ‫لتحويل‬
gray
like opacity and opacify but
$alpha
‫للوحدات‬ ‫مقارنه‬ ‫هى‬
How can we benefit?
Does anyone have any information?
Ali Ramadan

More Related Content

Recently uploaded

Recently uploaded (8)

GHASSOUB _Seance 2_ measurement and evaluation in education.pptx
GHASSOUB _Seance 2_ measurement and evaluation in education.pptxGHASSOUB _Seance 2_ measurement and evaluation in education.pptx
GHASSOUB _Seance 2_ measurement and evaluation in education.pptx
 
نظريات العمارة (AR334 )- محاضرة 01-الجزء الثاني.pdf
نظريات العمارة (AR334 )- محاضرة 01-الجزء الثاني.pdfنظريات العمارة (AR334 )- محاضرة 01-الجزء الثاني.pdf
نظريات العمارة (AR334 )- محاضرة 01-الجزء الثاني.pdf
 
الكامل في أسانيد وتصحيح حديث لا صلاة لجار المسجد إلا في المسجد وقول النبي لرج...
الكامل في أسانيد وتصحيح حديث لا صلاة لجار المسجد إلا في المسجد وقول النبي لرج...الكامل في أسانيد وتصحيح حديث لا صلاة لجار المسجد إلا في المسجد وقول النبي لرج...
الكامل في أسانيد وتصحيح حديث لا صلاة لجار المسجد إلا في المسجد وقول النبي لرج...
 
عربي عربي الجودة ال الجودة امنية فينا.pptx
عربي عربي الجودة ال الجودة امنية فينا.pptxعربي عربي الجودة ال الجودة امنية فينا.pptx
عربي عربي الجودة ال الجودة امنية فينا.pptx
 
﴿ فَاسْتَجَبْنَا لَهُ ﴾ دعاء مستجاب.pdf
﴿ فَاسْتَجَبْنَا لَهُ ﴾ دعاء  مستجاب.pdf﴿ فَاسْتَجَبْنَا لَهُ ﴾ دعاء  مستجاب.pdf
﴿ فَاسْتَجَبْنَا لَهُ ﴾ دعاء مستجاب.pdf
 
عرض حول اخراج التلاميذ المشاغبين من القسم
عرض حول اخراج التلاميذ المشاغبين من القسمعرض حول اخراج التلاميذ المشاغبين من القسم
عرض حول اخراج التلاميذ المشاغبين من القسم
 
GHASSOUB _Seance 6_ measurement and evaluation in education.pptx
GHASSOUB _Seance 6_ measurement and evaluation in education.pptxGHASSOUB _Seance 6_ measurement and evaluation in education.pptx
GHASSOUB _Seance 6_ measurement and evaluation in education.pptx
 
سياسات اليابان وتطورها وتاريخها وثقافتها ونظامها ومهارتها
سياسات اليابان وتطورها وتاريخها وثقافتها ونظامها ومهارتهاسياسات اليابان وتطورها وتاريخها وثقافتها ونظامها ومهارتها
سياسات اليابان وتطورها وتاريخها وثقافتها ونظامها ومهارتها
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

sass session by ali ramadan to themifiiy

  • 1. How to use SASS Tips and tricks Ali Ramadan
  • 2.  Variables  Nesting  Mixins  Functions  Imports  Control Directives: @if, @for, and @each
  • 3.
  • 5. How can we benefit? ‫داخل‬ ‫استخدامها‬ ‫يمكن‬ ‫ال‬ class ‫نستخدمها‬ ‫مع‬ _name.scss
  • 6. Organization only ‫ي‬ ‫تجاهل‬ ‫تم‬ _name ‫مترجمات‬ ‫قبل‬ ‫من‬ ً‫ة‬‫عاد‬ SCSS ‫ملف‬ ‫إلى‬ ‫صريح‬ ‫بشكل‬ ‫استيرادها‬ ‫يتم‬ ‫لم‬ ‫ما‬ SCSS ‫آخر‬ . ‫السفلية‬ ‫الشرطة‬ ‫استخدام‬ ‫يشير‬ _ ‫ملف‬ ‫اسم‬ ‫قبل‬ SCSS ‫مستقل‬ ‫بشكل‬ ‫ترجمتها‬ ‫يجب‬ ‫وال‬ ‫أخرى‬ ‫ملفات‬ ‫من‬ ‫جزء‬ ‫هي‬ ‫الملفات‬ ‫هذه‬ ‫أن‬ ‫إلى‬ . ‫يتم‬ ،‫ذلك‬ ‫من‬ ً‫ال‬‫بد‬ ‫ملفات‬ ‫إلى‬ ‫استيرادها‬ SCSS ‫أخرى‬ . ‫تنظيم‬ ‫في‬ ‫يساعد‬ ‫هذا‬ ‫الكود‬ ‫يجعل‬ ‫مما‬ ، ‫ال‬ refactor ‫أسهل‬ ‫والفهم‬ . ‫مثل‬ ،‫االستخدام‬ ‫إلعادة‬ ‫قابلة‬ ‫مكونات‬ ‫على‬ ‫تحتوي‬ ‫أن‬ ‫يمكن‬ mixins ‫والمتغيرات‬ . How can we benefit? ‫داخل‬ ‫استايالت‬ ‫نستخدم‬ class ‫ملف‬ ‫فى‬ scss ‫اخر‬ $var Mixin Partials
  • 7. !global How can we benefit? ‫من‬ ‫بدل‬ ‫استخدامها‬ root ‫الصياغه‬ ‫و‬ ‫الكتابه‬ ‫فى‬ ‫اسهل‬ ‫لاللوان‬ ‫الغامق‬ ‫و‬ ‫منهم‬ ‫الفاتح‬ ‫االلوان‬ ‫لدرجات‬ ‫استخدامها‬
  • 8. How can we benefit? ‫من‬ ‫القيم‬ ‫تمرير‬ ‫يمكن‬ twig ‫لل‬ ‫داتا‬ ‫امرر‬ ‫عايز‬ ‫كنت‬ ‫انى‬ ‫كده‬ ‫قبل‬ ‫مشكله‬ ‫فى‬ ‫كان‬ after
  • 9.
  • 10. How can we benefit? ‫القيم‬ ‫تمرير‬ ‫يمكن‬ ‫باالستايل‬ ‫الخاصه‬ ‫من‬ twig ‫من‬ ‫بدال‬ ‫االحيان‬ ‫بعض‬ ‫فى‬ ‫استخدامها‬ ‫يمكن‬ ‫و‬ js ‫الضافة‬ class ‫ل‬ ‫معين‬ div
  • 11.
  • 12. In compiler ‫ال‬ ‫عند‬ ‫اسهل‬ compiler ‫لملف‬ ‫بالنسبه‬ css ‫استخدامها‬ ‫يمكن‬ ‫مع‬ .class ‫ايضا‬ ‫إلى‬ ‫ترجمتها‬ ‫تتم‬ ‫ال‬ ‫خاصة‬ ‫محددات‬ CSS ‫ما‬ ‫صراحة‬ ‫إليها‬ ‫اإلشارة‬ ‫يتم‬ ‫لم‬ ‫إلعادة‬ ‫القابلة‬ ‫األنماط‬ ‫لتحديد‬ ‫مفيدة‬ ‫إخراجها‬ ‫في‬ ‫ترغب‬ ‫ال‬ ‫التي‬ ‫االستخدام‬ ‫إلى‬ ‫مباشرة‬ CSS ‫ال‬ ‫فى‬ ‫افضل‬ performance
  • 13. ‫كبيره‬ ‫بدرجه‬ ‫الكود‬ ‫هذا‬ ‫تحسين‬ ‫يمكن‬ How can we benefit? ‫داخل‬ ‫استايالت‬ ‫نستخدم‬ file ‫استخدامها‬ ‫و‬ ‫اساسى‬ ‫طريق‬ ‫عن‬ include ‫فيه‬ ‫يوجد‬ ‫ملف‬ ‫استخدام‬ ‫يمكن‬ mixin global ‫يمكن‬ ‫ثيم‬ ‫كل‬ ‫مع‬ ‫نسخه‬ ex
  • 14. How can we benefit? text and bg if bg dark text white Hover button Saturate ‫اللون‬ ‫تشبع‬ ‫لزيادة‬ deSaturate ‫اللون‬ ‫تشبع‬ ‫النقاص‬ Grayscale ‫ال‬ ‫الى‬ ‫اللون‬ ‫تشبع‬ ‫لتحويل‬ gray
  • 15. like opacity and opacify but $alpha
  • 16.
  • 17.
  • 19.
  • 20.
  • 21. How can we benefit? Does anyone have any information? Ali Ramadan