form-select-plaintext
See original GitHub issuePrerequisites
- I have searched for duplicate or closed feature requests
- I have read the contributing guidelines
Proposal
I’d like to style a select element (or any element, really) such that it has the same padding, margins, flow, etc, but appears as plaintext (meaning no border, no dropdown chevron, etc). Effectively like form-control-plaintext
, but for selects.
Motivation and context
I have some text in a table, and when its not editable, I want it to look like plain text. When the user clicks the edit button, I want the select dropdown to appear “around” the existing text, without shifting anything else on the page.
I’ve tried doing this with some complex calc()
s for padding, but I can’t seem to get it just right…
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
See #35688
You can use Datatables: inline editing or something like this. If you want simple solution, then set transparent border/background for “readonly” fields:
or you can customize
.form-control-plaintext
like as #35809 and prepend class to fields:<input class="form-control-plaintext form-control" ...>
You can try my select extension for Bootstrap (https://github.com/gianlucagiacometti/bootstrap-select) with the form-select-plaintext class