Enhance UI components and styles for better performance and accessibility
- Added a fixed minimum height to the AdSlot component to reduce Cumulative Layout Shift (CLS) and adjusted styles for better layout consistency. - Specified width and height attributes for the Barcode and QR Code images to improve rendering performance and maintain aspect ratios. - Introduced font-face declarations in global CSS for 'Inter' and 'Tajawal' fonts with 'swap' display to optimize font loading and reduce CLS.
This commit is contained in:
@@ -29,6 +29,22 @@
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
/* تحسين تحميل الخطوط لتقليل CLS */
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Inter'), url('/fonts/Inter.woff2') format('woff2');
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Tajawal';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Tajawal'), url('/fonts/Tajawal.woff2') format('woff2');
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
/* RTL Support */
|
||||
[dir="rtl"] body {
|
||||
font-family: 'Tajawal', 'Inter', system-ui, sans-serif;
|
||||
|
||||
Reference in New Issue
Block a user