Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
CFDI4.0 CartaPorte Multiple-companies email odoo.sh
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
CFDI4.0 CartaPorte Multiple-companies email odoo.sh
Mengenai forum ini
  1. Miscellaneous
  2. Forum

Change default placeholder color on forms. Color too light to see by default

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
1 Balas
2791 Tampilan
Avatar
Eric Osterberg
Hello,

I've been searching for what I hoped would be a simple solution to darkening the default placeholder text color. For example, on the contacts form, the address fields, I am unable to locate where to click, let alone what values to place in the form fields as the contrast is too weak, unless I view my monitor from an extreme angle. The default color is #dee2e6.

I've been hunting around the code and came up with this file: ./addons/web/static/src/webclient/webclient.scss where the following code is located:

@mixin o-placeholder {
// Rules below need to be separeted. Otherwise all browsers will discard the whole rule.
color: $input-placeholder-color;
}
::-webkit-input-placeholder {
// WebKit, Blink, Edge
@include o-placeholder;
}
::-moz-placeholder {
// Mozilla Firefox 19+
@include o-placeholder;
}
:-ms-input-placeholder {
// Internet Explorer 10-11
@include o-placeholder;
}

Where or how can I set the colors to use? Seem simple enough, somewhere I need to define $input-placeholder-color.

I tried reading https://www.odoo.com/documentation/16.0/developer/reference/user_interface/scss_inheritance.html and frankly I'm lost.

Can someone spell out a solution for me?

PS: I'm not all that strong with CSS, so, I might need a few more details than other web developers 😉

Thank you
1
Avatar
Buang
Chris Parker

Appreciate you coming back and providing your solution. That's a rarety!

Another option might be to use an add-in like Stylus to override the CSS. I haven't tried it yet on Odoo but it's worked well for me in the past. There are a few places I plan to use it on Odoo in the future.

IMHO the designers have good too far in their minimalism and would do well to always remember this is a business product meant for heavy data entry.

Avatar
Eric Osterberg
Penulis Jawaban Terbai

OK, I've hired a contractor for the hint and here's our solution.

Create the file structure for a custom addon...

/opt/odoo/odoo-server/custom-addons/custom_placeholder_color
/opt/odoo/odoo-server/custom-addons/custom_placeholder_color/static
/opt/odoo/odoo-server/custom-addons/custom_placeholder_color/static/css
/opt/odoo/odoo-server/custom-addons/custom_placeholder_color/static/css/main.scss
/opt/odoo/odoo-server/custom-addons/custom_placeholder_color/static/description
/opt/odoo/odoo-server/custom-addons/custom_placeholder_color/__manifest__\\\.py
/opt/odoo/odoo\\\-server/custom\\\-addons/custom_placeholder_color/__init__\\\.py

Then\\ the\\ contents\\ of\\ this\\ file /opt/odoo/odoo\\-server/custom\\-addons/custom_placeholder_color/static/css/main\\.scss\\ will\\ set\\ the\\ color\\ scheme\\.

:root\\ \\{
\\-\\-bs\\-gray\\-300:\\ \\#474747;
\\}
::placeholder\\ \\{
\\ \\ color:\\ \\#474747;
\\}

In\\ addition\\ this\\ file\\ may\\ be\\ valuable\\ to\\ someone\\ starting\\ out\\.

cat\\ /opt/odoo/odoo\\-server/custom\\-addons/custom_placeholder_color/__manifest__\.py
\#\ \-\*\-\ coding:\ utf\-8\ \-\*\-

\{
\ \ \ \ 'name':\ 'Placeholder\ Color\ Changer',
\ \ \ \ 'version':\ '16\.0\.0\.1',
\ \ \ \ 'author':\ 'gray duck locks',
\ \ \ \ 'license':\ 'OPL\-1',
\ \ \ \ 'website':\ 'https://127.0.0.1',
'category': 'Extra',
'depends': [
'base'
],
'data': [

],
'assets': {

'web.assets_backend': [
'custom_placeholder_color/static/css/main.scss',
], },


'description': u'Change all placeholder color to #474747',
}

Does anyone have comments about improving this solution?

Thank you

2
Avatar
Buang
Eric Osterberg
Penulis

Sorry guys, the formatting is terrible, I tried twice, but this forum does not display the way I entered the text. Hopefully you get the idea.

Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now