A guide to adjusting the size of a mat-button using an svg mat-icon

I have PrimeNg and Angular Materials buttons on the same td. I am attempting to resize my mat-buttons to match the size of my pButtons but they are not adjusting properly. Should I consider using a different type of button with my icon?

HTML

<button mat-mini-fab class="identify_icon"(click)="zebraIdentify()"><mat-icon svgIcon="identify_icon"></mat-icon> </button>
<button mat-mini-fab class="start_icon" (click)="zebraStartReads()"><mat-icon svgIcon="start_icon"></mat-icon> </button>
<button mat-mini-fab class="stop_icon" (click)="zebraStopReads()"><mat-icon svgIcon="stop_icon"></mat-icon> </button>

CSS

::ng-deep .mat-mini-fab {
height:3px !important;
padding-bottom: 40px !important;
border-radius: 9px !important;
/* font-size: 1em; */
transition: none !important;
box-shadow: none !important;
margin-right: 5px;
margin-left: 5px;
}

.identify_icon {
    background-color: #59BFC9;
}

.start_icon {
    background-color: #A2CB75;
}

.stop_icon {
    background-color: #E01515;
}

Answer №1

To resize an SVG element, simply add the transform: scale(2); style and set the value to 2 for 200% of the original size:

.resize-24 svg {
    width: 24px;
    height: 24px;
    transform: scale(2);
}

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

The child module is unable to locate the route URL for the parent module

I'm new to Angular and I'm working on organizing my code into modules. So far, I have an admin module that responds to the /admin request, but now I want to add a child module called Portfolio Module. Everything is working fine, except for the f ...

Interactive Tab content display

I'm working on a tabs component and I need Angular to only render and initialize the active tab instead of all tabs. Is there a way to achieve this? <my-tabs> <my-tab [tabTitle]="'Tab1'"> <some-component></some-co ...

Execute functions when switching between tabs rather than displaying their content - ClrTabs

I am looking to utilize the ClrTabs component for controlling an iframe's content with JavaScript. The goal is to switch between different views inside the iframe by clicking on corresponding ClrTab elements. I am having trouble figuring out how to ha ...

Creating a Full Screen Image with HTML and CSS

On my current web project, I am aiming for an immediate impact with a full-screen image that transitions to reveal text and information when the user starts scrolling. The challenge lies in ensuring this effect is consistent across various screen resolutio ...

The antithesis of a feature that encapsulates a chosen area with a span

Hi everyone, I have a function that works as follows: define(function () { 'use strict'; var sel, range, span; return function () { span = document.createElement("span"); span.className = 'highlight'; if (window.ge ...

The success of an Angular function hinges on the outcome of an asynchronous function

Scenario: In my code, I have a function named isAuthorized() in a singleton called AuthSessionSingleton. This function depends on the result of an asynchronous operation. The async operation is an API call triggered in the constructor, expecting an objec ...

transmit information to a service using Angular 8

There are 4 multiselect dropdowns, and when I click on an event, I save the data array of objects in the same component. Now, I need to send this data to display it in another component. To achieve this, I am using a service. However, every time I send th ...

What is the best way to extend a column across multiple rows with bootstrap?

Looking to convert the design above into HTML and CSS, specifically trying to achieve a layout where the image spans across 2 rows. However, I've been having trouble making it responsive even after trying some code snippets I found online. Here' ...

Closing the space between navigation bar choices

I'm currently working on my website's navbar menu and struggling to eliminate the gap between each of the navbar links. It seems that the li attributes with the class dropdown are slightly wider than the rest of the links, causing this issue. I&a ...

Designing a Bootstrap table using various Angular elements

I'm currently in the process of developing a Bootstrap table that utilizes two Angular components. This is how my code is structured : componentA.html <table class="table table-bordered"> <thead> <tr> <th scope="col">#</ ...

Tips on designing checkboxes with CSS

Can someone help me figure out how to style a checkbox using the code below? <input type="checkbox" style="border:2px dotted #00f;display:block;background:#ff0000;" /> I've tried applying this style but it doesn't seem to work. The chec ...

Issue arises when attempting to utilize the Angular2 File Uploader feature found at http://ng2-uploader.com

Just starting out with Angular 2 and trying to upload a file using . Followed the documentation and README file instructions, but encountering this error in the browser: GET http://localhost:3000/ng2-uploader 404 (Not Found) (SystemJS) XHR error (404 Not ...

Utilizing Selenium with Java, you can hover over a button and choose to click on any of the available options

Currently, I am utilizing Selenium to automate the user interface using Java. Within the UI, there is an action button that, when hovered over by the User, displays two clickable options - Create and Edit. For ease of use, I have stored CSS locators as E ...

What is the best way to switch between different styles for each paragraph using CSS?

I attempted to use the :nth-of-type selector, but I am uncertain if it is feasible or if it accomplishes what I desire. My goal is to create an alternating style: two paragraphs aligned on the left, followed by two on the right, and so forth, regardless of ...

What is the proper location to insert CSS within Laravel?

What is the recommended location for storing CSS or JS files in Laravel? More specifically, what are the differences between placing CSS files in /public versus /resources/css? Which directory is preferable for storing my CSS files? ...

Is it possible in HTML to detect *any* changes made to an input, not just those made by the keyboard?

Let's consider a scenario where we have an input element like this: <input id="myInput" type="text" /> The question now arises, how can we detect when the value of this input is changed programmatically (such as through $("#myInput").val("new ...

Having additional space preceding list elements within a flexbox setup

Check out the code snippet below: HTML Code <ul class="menu"> <li><a href="#">Item 1</a></li> <li> <a href="#">Item 2</a> </li> <li> <a href="#">Item 3</a> </li& ...

Displaying three tables in each row using ng-repeat, with the ability to repeat the process multiple times

Is it possible to repeat a table multiple times with each set of three tables in the same line using AngularJS and Bootstrap? I am unsure how this can be achieved with ng-repeat. table 1 | table 2 | table 3 table 4 | table 5 | ... <div ng-repeat="zo ...

Experiencing difficulties connecting JavaScript with HTML

I'm encountering difficulty with implementing my JavaScript on my website. While it functions properly in this JS Fiddle, I am experiencing issues when trying to use it on my actual site. Below is how I have linked the JS on my site: <head> < ...

I'm wondering why my .focus() function is causing the cursor to move to the start of my contenteditable div?

I am currently developing a website for writing books, primarily using php. I have implemented a jQuery function that, upon clicking the "New Chapter" button, triggers an AJAX function along with various other JS/jQuery events. One of these events is inten ...