material icon indicating copy to clipboard operation
material copied to clipboard

MD-Tabs with MD-Icons off-centered

Open WDShannon opened this issue 10 years ago • 7 comments

Adding an md-icon inside an md-tab-label produces an icon that is off-centered inside its container if the size is over 24px.

        <md-tabs md-dynamic-height md-stretch-tabs="always" md-border-bottom>
          <md-tab>
            <md-tab-label>
              <md-icon style="font-size:48px" class="material-icons md-primary">warning</md-icon>
            </md-tab-label>
            <md-tab-body>
              <md-content>
                content1
              </md-content>
            </md-tab-body>
          </md-tab>

codepen

WDShannon avatar Mar 09 '16 19:03 WDShannon

@k3ilbasa Might want to check that codepen again... currently not demonstrating the issue.

mckenzielong avatar Mar 10 '16 00:03 mckenzielong

@mckenzielong Is right, please provide a demo which represents your issue.

devversion avatar Mar 10 '16 14:03 devversion

Also, please tell us what browser(s) is having issues unless it manifests in all browsers.

topherfangio avatar Mar 10 '16 22:03 topherfangio

Sorry about that, not quite sure how I linked the wrong one. The correct one is here. This is happening in all browsers that I have seen so far. I am using (chrome 48.0.2564.116 m) and (IE 11.0.9600.18204).

WDShannon avatar Mar 14 '16 19:03 WDShannon

@k3ilbasa You have changed the font-size property to make it larger, but you didn't update the width/height to compensate.

Here is an example where the first two icons are fixed: http://codepen.io/topherfangio/pen/EKNjav

P.S. I would recommend doing this in your stylesheet instead of a style="..." tag.

topherfangio avatar Mar 14 '16 20:03 topherfangio

@topherfangio huh, interesting... haven't really used font-icons all too often myself... is it common to set width/height and font-size? It isn't terribly obvious that you would have to do that (see docs: https://material.angularjs.org/latest/demo/icon, only changes the font-sizes)

mckenzielong avatar Mar 14 '16 20:03 mckenzielong

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its recipients. This is a temporary error. The following address(es) deferred:

[email protected] Domain zyapps.com has exceeded the max emails per hour (423/400 (105%)) allowed. Message will be reattempted later

------- This is a copy of the message, including all the headers. ------ Received: from github-smtp2-ext3.iad.github.net ([192.30.252.194]:54256 helo=github-smtp2b-ext-cp1-prd.iad.github.net) by serveur.ex2-p10.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_1) (envelope-from [email protected]) id 1afmMi-000akn-UF for [email protected]; Tue, 15 Mar 2016 11:38:30 +0100 Date: Mon, 14 Mar 2016 13:28:41 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1457987321; bh=UZv1Tw1pAiIymzw7inxrVoIAlU2Xcm0YfOtMmt1VxTY=; h=From:Reply-To:To:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=PtNrhVR0qL0L7B5leA+WJUvYqdKA/kds36iLy2ZyJgbWC/xM/RZxBMgObNEPH9Ir8 1rWrI7oDwpGUUO13B5sXITOC2Exca+IKkE6L+gRo1GQkGLa5ErcfGC9ha+d67xK/s8 Y+HYbb2QKy69R1s0I4Dh5Dikq0Xef4bY63wvH7J8= From: McKenzie Long [email protected] Reply-To: angular/material [email protected] To: angular/material [email protected] Message-ID: angular/material/issues/7495/[email protected] In-Reply-To: angular/material/issues/[email protected] References: angular/material/issues/[email protected] Subject: Re: [material] MD-Tabs with MD-Icons off-centered (#7495) Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--==_mimepart_56e71ef974648_1ecf3f811da1d2bc736363"; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: list X-GitHub-Sender: mckenzielong X-GitHub-Recipient: yanndupuy List-ID: angular/material <material.angular.github.com> List-Archive: https://github.com/angular/material List-Post: mailto:[email protected] List-Unsubscribe: mailto:unsub+000df0dc4a085635f92a477a7ac745b7d53815d300aa512d92cf0000000112fee0f992a169ce0853644c@reply.github.com, https://github.com/notifications/unsubscribe/AA3w3H6B-P1g3CIbTGKn6FW_FA9c2XDwks5ptcT5gaJpZM4HtFk5 X-Auto-Response-Suppress: All X-GitHub-Recipient-Address: [email protected] X-Spam-Status: No, score=-2.7 X-Spam-Score: -26 X-Spam-Bar: -- X-Ham-Report: Spam detection software, running on the system "serveur.ex2-p10.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see root@localhost for details.

Content preview: @topherfangio huh, interesting... haven't really used font-icons all too often myself... is it common to set width/height and font-size? It isn't terribly obvious that you would have to do that (see docs: https://material.angularjs.org/latest/demo/icon, only changes the font-sizes) [...]

Content analysis details: (-2.7 points, 5.0 required)

pts rule name description


-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.30.252.194 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [192.30.252.194 listed in wl.mailspike.net] 0.8 DATE_IN_PAST_12_24 Date: is 12 to 24 hours before Received: date -0.0 SPF_PASS SPF: sender matches SPF record 1.6 HTML_IMAGE_ONLY_12 BODY: HTML: images with 800-1200 bytes of words 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Spam-Flag: NO

----==_mimepart_56e71ef974648_1ecf3f811da1d2bc736363 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit

@topherfangio huh, interesting... haven't really used font-icons all too often myself... is it common to set width/height and font-size? It isn't terribly obvious that you would have to do that (see docs: https://material.angularjs.org/latest/demo/icon, only changes the font-sizes)


Reply to this email directly or view it on GitHub: https://github.com/angular/material/issues/7495#issuecomment-196508294 ----==_mimepart_56e71ef974648_1ecf3f811da1d2bc736363 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

@topherfangio huh, interesting... haven't really used font-icons all too often myself... is it common to set width/height and font-size? It isn't terribly obvious that you would have to do that (see docs: https://material.angularjs.org/latest/demo/icon, only changes the font-sizes)

—
Reply to this email directly or view it on GitHub.

----==_mimepart_56e71ef974648_1ecf3f811da1d2bc736363--

yanndupuy avatar Mar 15 '16 10:03 yanndupuy