Maryam Ilka commited on
Commit
f8482ac
·
verified ·
1 Parent(s): dd1df7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -7
app.py CHANGED
@@ -89,17 +89,49 @@ st.markdown("""
89
  color: black !important;
90
  opacity: 0.7 !important;
91
  }
92
-
93
- /* استایل برای فلش dropdown در selectbox */
94
  .stSelectbox select {
95
  -webkit-appearance: none !important;
96
  -moz-appearance: none !important;
97
  appearance: none !important;
98
- background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236a0dad'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e") !important;
99
- background-repeat: no-repeat !important;
100
- background-position: left 12px center !important;
101
- background-size: 16px !important;
102
- padding-left: 36px !important; /* فضای کافی برای آیکون */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  }
104
 
105
  /* استایل برای لیست dropdown */
 
89
  color: black !important;
90
  opacity: 0.7 !important;
91
  }
92
+
93
+ /* حذف فلش پیش‌فرض و جایگزینی با استایل مشابه number input */
94
  .stSelectbox select {
95
  -webkit-appearance: none !important;
96
  -moz-appearance: none !important;
97
  appearance: none !important;
98
+ background-image: none !important;
99
+ padding-right: 40px !important; /* فضای کافی برای فلش */
100
+ position: relative;
101
+ }
102
+
103
+ /* ایجاد فلش سفارشی با استایل مشابه number input */
104
+ .stSelectbox div[data-baseweb="select"]::after {
105
+ content: "▼";
106
+ position: absolute;
107
+ right: 12px;
108
+ top: 50%;
109
+ transform: translateY(-50%);
110
+ color: var(--primary) !important;
111
+ font-size: 12px;
112
+ pointer-events: none;
113
+ }
114
+
115
+ /* استایل hover برای فلش */
116
+ .stSelectbox div[data-baseweb="select"]:hover::after {
117
+ color: var(--primary) !important;
118
+ }
119
+
120
+ /* استایل دکمه‌های number input */
121
+ .stNumberInput button {
122
+ color: var(--primary) !important;
123
+ background-color: transparent !important;
124
+ border: none !important;
125
+ width: 30px !important;
126
+ font-weight: bold !important;
127
+ font-size: 16px !important;
128
+ }
129
+
130
+ /* یکسان سازی حاشیه‌ها */
131
+ .stSelectbox select,
132
+ .stNumberInput input {
133
+ border: 1px solid var(--border) !important;
134
+ border-radius: 4px !important;
135
  }
136
 
137
  /* استایل برای لیست dropdown */