Remove padding from cells in Angular ag-grid-angular

Struggling with the inner padding in cells when using ag-grid-angular.

Any tips on how to remove it would be greatly appreciated.

https://i.sstatic.net/jFgiV.png

Answer №1

If you're looking to make a change in the appearance of your ag grid, consider adjusting the height and line-height settings in your CSS imports. For example, changing the height from 40px to 30px and updating the line height can give your grid a new look:

  @import 'ag-grid-community/dist/styles/ag-grid.css';
@import 'ag-grid-community/dist/styles/ag-theme-alpine.css';

.ag-theme-alpine .ag-row {
  height: 30px;
}
.ag-theme-alpine .ag-cell, .ag-theme-alpine .ag-full-width-row .ag-cell-wrapper.ag-row-group{
  line-height: min(var(--ag-row-height, 30px), 30px);
}

For a live example, check out this link: https://stackblitz.com/edit/ag-grid-angular-hello-world-k3cp9p?file=src/styles.scss

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

Configuring Media Query for iPad Air and iPad Pro

I'm facing a challenge setting up media queries for different iPad devices in my Next.js code. I have three cards (or divs) arranged in a row, utilizing the React-Bootstrap grid system for layout. While the cards default to full width within the grid ...

Is it possible to tailor the style output of .sass?

.bar { font-size: 16px; } Can anyone suggest a way to automatically add a newline before the closing } when converting a .sass file to a .css file? I'm specifically looking for guidance on how to implement this feature in the command sass --watch st ...

Adding ngChange programmatically in Angular without using attributes is a common challenge faced

I am attempting to replicate the functionality of the ng-change attribute within a directive without making changes to the HTML (thus excluding the use of the ng-change property). After examining the Angular source code for the ngChange directive, I have ...

Updating the iFrame source using jQuery depending on the selection from a dropdown menu

I want to create a dynamic photosphere display within a div, where the source is determined by a selection from a drop-down menu. The select menu will provide options for different rooms that the user can view, and the div will contain an iframe to showca ...

Attempting to arrange form input fields into groups of three columns

I am facing a challenge in arranging my input fields within the form in a column of 3. The issue is that I have more code than anticipated, making it difficult to achieve this layout. Despite several attempts, nothing seems to be working. I have spent hour ...

Initial 16 characters of the deciphered message are nonsensical

In a specific scenario, I encounter data encryption from the API followed by decryption in TypeScript. I have utilized CryptoJS for decryption in TypeScript. Below is the decryption code snippet: decrypt(source: string, iv: string): string { var key = envi ...

Establishing foreignObject coordinates in Angular

Struggling with setting the position (x, y) for foreignObject in Angular. I have attempted the following: <foreignObject width="65" height="50" x="{{position?.x}}" y="{{position?.y}}"> <div class="c ...

Updating CSS for dropdown menu in Fluent/Fabric design

I am working with a dropdown component from Fluent UI and I am trying to customize the CSS of the dropdown options. Although I can add classes using className to the dropdown itself, I am facing difficulty in styling the dropdown options directly due to th ...

Navigating a table while keeping headers in place at the top

Trying to construct a table where the thead remains fixed while the tbody scrolls. Utilizing percentages and fixed width for cell size determination, aiming for uniformity and alignment between percentage td's and thead headers. Referenced JSFiddle d ...

Is there a copyright concern regarding CSS?

There are countless websites that spark my creativity. If I am inspired by a particular design, CSS, or JavaScript on one of these sites, am I allowed to copy it to my local folder and use it? For instance, let's say I come across a website called xy ...

Unusual browsing patterns in angularjs when using the ionic framework

Check out this demo I am able to navigate from page 1 to page 2 using the link: <a href="#/threadContent">GO</a> However, I am having issues getting back from page 2 to page 1 using <a href="#/home">Back</a>. I'm curiou ...

Tips for achieving seamless expansion and eliminating grid row gaps by utilizing hidden elements in CSS

I'm currently developing a web design that includes a section with both visible and hidden content. I've added a button to smoothly reveal the hidden content using a transition effect. However, I'm encountering a couple of challenges: Even ...

Unable to specify custom header in HttpClient (ionic 3 application with Angular 5)

I'm attempting to utilize an API that requires an 'Auth' key. I am working on sending the key using httpHeaders with the code provided below: getTest(){ let data = {'loginusertype':'12','loginuserid':'51&a ...

Express app does not receive HTTP GET parameter

When making the GET request, the response received is a 404 error code. Upon sending the request to http://localhost:3000/api/watchings/?watchItemUniqueKey=5dab6083b68bd049c0b8f9ce%7C5daf5e0c8d261e5364acd8b6, the server responds with a 404 Not Found err ...

Is there a way to display the true colors of a picture thumbnail when we click on it?

In my project, I attempted to create a dynamic color change effect when clicking on one of four different pictures. The images are displayed as thumbnails, and upon clicking on a thumbnail, it becomes active with the corresponding logo color, similar to t ...

Utilizing CSS to Style List Items with the :nth-child Selector

How can I style my ul list items to match the design shown in the image? Can this be achieved using CSS nth-child selector or any other CSS techniques? https://i.sstatic.net/fkfMl.jpg ul, ol { list-style: none; padding: 0; } li { text-align: cent ...

Can a lightweight database be utilized in a Nativescript project focused on code sharing?

Currently, I am in the process of launching a new code sharing project using nativescript. My main goal is to create an offline app suitable for both tablets and desktops. I have successfully implemented code sharing following this guide: . Now, my focus ...

Creating a custom CSS clip to apply a rounded path on an image

I have been experimenting with applying a "clip path" to an image using a rounded path. While I am aware that SVG clip paths are an option, I found them to be less responsive. As an alternative, I attempted to place the SVG graphic under the image within a ...

What methods can I use to locate the circular dependency within my program?

I am facing numerous circular dependency errors in my Angular project, causing it to malfunction. Is there a way to identify the section of the code where these circular dependencies exist? Warning: Circular dependency detected: src\app&bs ...

How can you achieve a vertical list display for a label while preserving its inline-block properties?

I have chosen to use labels for my radio buttons because I enjoy the convenience of being able to click on the text to select the option. However, I want these labels to appear in a vertical list format. Currently, they are displaying as blocks, causing th ...