Spaces:
Sleeping
Sleeping
RTL_CSS = """ | |
/* RTL Support for Persian/Arabic */ | |
.gradio-container { | |
direction: rtl !important; | |
text-align: right !important; | |
} | |
/* Fix input fields alignment */ | |
.gr-textbox, .gr-number, .gr-slider { | |
direction: rtl !important; | |
text-align: right !important; | |
} | |
/* Fix labels */ | |
label { | |
direction: rtl !important; | |
text-align: right !important; | |
} | |
/* Fix buttons */ | |
.gr-button { | |
direction: rtl !important; | |
} | |
/* Fix markdown content */ | |
.gr-markdown { | |
direction: rtl !important; | |
text-align: right !important; | |
} | |
/* Fix specific input elements */ | |
input[type="number"], input[type="text"], textarea { | |
direction: rtl !important; | |
text-align: right !important; | |
} | |
/* Fix column layouts */ | |
.gr-column { | |
direction: rtl !important; | |
} | |
/* Fix row layouts */ | |
.gr-row { | |
direction: rtl !important; | |
} | |
/* Fix slider component */ | |
.gr-slider input { | |
direction: ltr !important; | |
} | |
/* Ensure proper spacing for Persian text */ | |
body { | |
font-family: 'Tahoma', 'Arial', sans-serif !important; | |
direction: rtl !important; | |
} | |
/* Fix any remaining LTR elements */ | |
* { | |
direction: inherit; | |
} | |
/* Special fixes for gradio components */ | |
.wrap.svelte-1116kco { | |
direction: rtl !important; | |
} | |
.container.svelte-1116kco { | |
direction: rtl !important; | |
} | |
""" | |
HTML_HEAD = """ | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
@import url('https://fonts.googleapis.com/css2?family=Vazir:wght@300;400;500;600&display=swap'); | |
body { font-family: 'Vazir', 'Tahoma', Arial, sans-serif !important; } | |
</style> | |
""" |