Maryam Ilka commited on
Commit
5bcef7c
·
verified ·
1 Parent(s): 6519fe1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -20
app.py CHANGED
@@ -110,34 +110,53 @@ st.markdown("""
110
  }
111
 
112
  /* ========== استایل‌های خاص Selectbox ========== */
113
- /* ح فلش پیشفرض */
114
- .stSelectbox select {
115
- color: var(--primary) !important;
116
- background-color: transparent !important;
117
- border: none !important;
118
- width: 30px !important;
119
- font-weight: bold !important;
120
  }
121
 
122
- .stSelectbox select:hover {
123
- background-color: #f0e6ff !important;
 
124
  }
125
 
126
- /* لیست dropdown */
127
- .stSelectbox [role="listbox"] {
128
- background-color: white !important;
129
- border: 1px var(--primary) !important;
130
- box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
 
 
 
 
 
 
 
 
 
131
  }
132
 
133
- /* آیتم‌های dropdown */
134
- .stSelectbox [role="option"] {
135
- padding: 8px 12px !important;
136
- color: var(--text) !important;
 
 
 
 
137
  }
138
 
139
- .stSelectbox [role="option"]:hover {
140
- background-color: #f0e6ff !important;
 
 
 
 
 
141
  }
142
 
143
  /* ========== استایل‌های Number Input ========== */
 
110
  }
111
 
112
  /* ========== استایل‌های خاص Selectbox ========== */
113
+ /* حذف کامل فلش پیشفرض در تمام مرورگرها */
114
+ div[data-baseweb="select"] > div:first-child {
115
+ -webkit-appearance: none !important;
116
+ -moz-appearance: none !important;
117
+ appearance: none !important;
118
+ background-image: none !important;
119
+ padding-right: 40px !important;
120
  }
121
 
122
+ /* برای اینترنت اکسپلورر */
123
+ div[data-baseweb="select"] > div:first-child::-ms-expand {
124
+ display: none !important;
125
  }
126
 
127
+ /* ایجاد فلش سفارشی */
128
+ div[data-baseweb="select"] {
129
+ position: relative;
130
+ }
131
+
132
+ div[data-baseweb="select"]::after {
133
+ content: "▼";
134
+ position: absolute;
135
+ left: 12px;
136
+ top: 50%;
137
+ transform: translateY(-50%);
138
+ color: var(--primary);
139
+ font-size: 12px;
140
+ pointer-events: none;
141
  }
142
 
143
+ /* استایل اصلی جعبه انتخاب */
144
+ div[data-baseweb="select"] > div:first-child {
145
+ width: 100%;
146
+ background: white !important;
147
+ border: 1px solid var(--primary) !important;
148
+ border-radius: 4px !important;
149
+ padding: 10px 15px;
150
+ cursor: pointer;
151
  }
152
 
153
+ /* استایل لیست dropdown */
154
+ div[role="listbox"] {
155
+ background-color: white !important;
156
+ border: 1px solid var(--primary) !important;
157
+ border-radius: 4px !important;
158
+ box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
159
+ margin-top: 5px !important;
160
  }
161
 
162
  /* ========== استایل‌های Number Input ========== */