How do I modify the height of a q-select component in Quasar?

I have been struggling to change the q-select in the quasar framework, despite numerous attempts.

<q-select v-model="site1" outline dense class="selection" />
:deep(.selection .q-field__control) {font-size: 13px; width: 250px;}

:deep(.selection .q-field__outlined){ height: 28px;}

My goal is to set the height of the q-select to 28px.

Answer №1

.k-mini-input .q-field__control,
.k-mini-input .q-field__inner,
.k-mini-input .q-field__marginal,
.k-mini-input .q-field__control input {
    height: 28px !important;
    min-height: 28px !important;
}

.k-mini-input .q-field__control,
.k-mini-input .q-field__native {
    padding: 0 4px;
}

.k-mini-input .q-field__inner {
    min-height: 28px;
}

.k-mini-input .q-field__native {
    min-height: 28px !important;
}

In my project, I have implemented something similar to the code above. This code snippet is designed to work with q-select and q-input elements. For q-select to work properly with this code, the element needs to have the k-mini-input class. If needed, you can switch out the k-mini-input class for the q-select class to apply these styles to all select elements in your application.

Answer №2

By utilizing the app.scss or app.css, I have achieved success in altering certain q-elements. It appears that modifying them inline or through classes in other locations does not have the same effect.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Vue/Vite - Exceeded heap capacity, Allocation unsuccessful - Ran out of memory on JavaScript heap (unplugin-vue-components)

I keep encountering a memory problem while working with Vite: I'm getting an error message saying "Reached heap limit Allocation failed - JavaScript heap out of memory" Here is the output: <--- Last few GCs ---> [23466:0x5e196b0] 37408 ms ...

How can I use jQuery to display a div alongside the element that is currently being hovered over?

Imagine having multiple divs similar to these: UPDATE: <div class="ProfilePic"> <a href="#"> <img src="lib/css/img/profile_pic1.png" alt="" class="ProfilePicImg"/> </a> <div class="PopupBox" style="display: ...

Vue: when switching between two instances of identical components, the view does not refresh

Within my Vue-powered UI setup, there is functionality that allows the user to switch between different content options within a specific div. Interestingly, two of these options involve utilizing instances of the same child component but with varying prop ...

Exploring the benefits of leveraging Express with SSL security features

I recently acquired a Comodo SSL certificate for setting up an SSL server with express. The certificates I have include: AddTrustExternalCARoot.crt COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt mysite.com.key mysite.com.csr mysite_co ...

Adding style tags dynamically to a component and then encapsulating the styles again (using Angular)

Currently, I am in the process of upgrading from AngularJS to Angular. Our app is currently a hybrid one being bundled up with webpack instead of just angular cli. Due to this setup, we have encountered issues where our css or scss files are not correctly ...

Select the five previous siblings in reverse order using jQuery's slice method

I have a unique approach to displaying a series of divs where only 5 are shown at a time using the slice() method. To navigate through the items, I include an ellipsis (...) link after every 4th item, which allows users to easily move on to the next set of ...

Accessing attribute value of selected option in AngularJS select element

I have a select tag that displays options, and I want it so that when an option is selected, the value of the data-something attribute is copied into the input element. This is just for demonstration purposes; the actual value should be sent in the form. ...

Upcoming: Error in syntax: Unexpected character encountered, expected a "}"

Inserted a Google Tag Manager script into a .jsx file in the following format: <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getE ...

How can I handle JSON data that contains undefined values?

Similar Question: Is it possible to parse JSON with special 'undefined' values using JavaScript? I'm curious if there's a way to parse something like javascript JSON.parse('{ "name": undefined}'); that is generated by an API ...

Updating Angular.js scope after a variable has been modified

On my website, I have implemented a search bar that communicates with a controller receiving JSON responses from the server. The response is stored in a global variable called assetResult. It works as expected initially; however, subsequent searches do no ...

Bookmarklet does not successfully inject jQuery on a specific webpage

Trying to utilize a certain bookmarklet: javascript:void((function(doc){if(typeof jQuery=='undefined'){var script_jQuery=document.createElement('script');script_jQuery.setAttribute('src','https://code.jquery.com/jquery ...

Prevent any future dates from being entered

My Thoughts: <input type="text" class="datepicker" placeholder="DD/MM/YYYY" id="datepicker" ng-model="datepicker" name="datepicker" style="width:100%" tabindex="4" required/>` Controller: `$('#datepicker').datepicker({ format: &a ...

An error was encountered stating "TypeError: Unable to call function on undefined object while attempting to utilize a JSON object

My current setup involves using D3js with MongoDB and AngularJS to showcase my data. Everything works smoothly until I decide to give my JSON array a name. Suddenly, Angular starts throwing errors at me and I'm left confused as to why. Here is the or ...

Incorporating a template or component into the Vue.js router.js

If someone can provide me with an answer on how to import templates into route.js in Vue.js, I would greatly appreciate it:) Here is my HTML: <head> <script src="https://cdn.jsdelivr.net/npm/vue"></script> <script src="h ...

Encountered a PrismaClientValidationError in NextJS 13 when making a request

I am currently working on a school project using NextJS 13 and attempting to establish a connection to a MYSQL database using Prisma with PlanetScale. However, when trying to register a user, I encounter the following error: Request error PrismaClientValid ...

Here's how you can use welding techniques to attach objects and incorporate fin-like structures in THREE

I am currently working on a project involving a rocket ship orbiting various planets. To achieve this, I have started by creating my own rocket ship object and am aiming to model it similarly to this design: https://kyleagnew.files.wordpress.com/2018/02/lo ...

Determining if a swf file has loaded using JavaScript and swfobject

Here is the code snippet I am working with: <head> # load js <script> function graph() { swfobject.embedSWF( "open-flash-chart.swf", "chart", "400", "180", "9.0.0", "expressInstall.swf", {"data-file":"{% url moni ...

What is the best way to populate a dropdown menu by matching keys from an array within an ng-repeat

My JSON structure looks like this: 101 : "List": [ { "Name": "Pink" }, { "Name": "Black" } ] 102 : "List": [ { "Name": "Red" }, { "Name": "Yellow" } ] $sco ...

Remove webpack functions from the bundle

After following a comprehensive tutorial on bundling files with webpack and some additional online research, I successfully created a configuration file that organizes the modules in my library into the specified structure: dist/node/weather.min.js dist/we ...

Error: Attempting to update the value of 'ordersToDisplay' before it has been initialized in a re-render of React. This results in an Uncaught ReferenceError

Trying to dynamically update the document title to include the order number by clicking a button to display different numbers of orders from an array on the screen. The process involves importing a JSON file, filtering it based on user input, calculating ...