
#Css shape drupal icon update#
If a new brand is added to the Simple Icons project but does not appear as an option in the Drupal field then raise an issue and I will update icon-data.json and tag a new release.If a brand updates its icon, and the Simple Icons project has updated to use the new icon, then update the copy of Simple Icons in your libraries/simple-icons directory and the new icon should become available. Go to /admin/structure/micon and follow these steps: Click the Add Micon Package button.A list of all the available icons can be found in icon-data.json in the module's root.


#Css shape drupal icon how to#
Specifications - How using icons should work from the end-user experience Design (this page) - How to implement the icons module at a code level. ::before creates a pseudo-element that is the. Requirements - What is needed for icons in Drupal. Learn How to create File Icon Shape Design with CSS by creating rectangle with Flex Layout and Key CSS properties like border and ::before. What icons are available/can I add an icon? This is the third part of 3 development documents that should serve as an outline for building a module to manage icons in Drupal. AccessibilityĪ element is contained within each SVG with the name of the brand that is represented by the icon. Need to add an CSS class to the icons provided by this module? Override the template provided by this module and you can edit the markup of the element that wraps the icons. There is currently no need for configuration.
#Css shape drupal icon install#
Once the Simple Icons library is in the correct location (see Requirements) then you can install this module as normal.Īfter installation you will have a 'Simple Icons icon' field type and field formatter available, as well as the Twig function mentioned above. Once you have done this, running the following command from your Drupal site's webroot should return SVG markup:Ĭat libraries/simple-icons/icons/drupal.svg Installation There are already too many divs in my sample icon. For the shaded part, I used a box-shadow in styling it. I tried adding different shapes of ovals and circles inside the bigger circle but it did not work. Follow this guide then run the following Composer command: Currently, I am playing with HTML and CSS and I wanted to make a icon from this image. My preferred way of doing this is via Asset Packagist. Make sure that you have extracted the contents of the Simple Icons repo to libraries/simple-icons. The slugs can be found in the icon-data.json file found in the module root. Note: A class prefix is added automatically, but it is recommended to keep the class prefix as short as reasonably possible, as it is used in both CSS files and within the icon markup. The Twig function accepts a single argument of the slug that represents each icon. Go to /admin/structure/micon and follow these steps: Click the Add Micon Package button. No more support tickets to ' Add a link to X in the footer'!Īs a convenience and for non-CMS managed content a Twig function is provided to output a single icon: Then, if a client wanted to add a new social media profile they could do it all themselves, including supplying an icon. Or use Config Pages and a Paragraph type to do a similar thing (outputting the Config Pages entity as a block, just like a menu). If your client has a list of social media profiles in their footer then you could build it as a Drupal menu, install the Menu Item Extras module, and then add a Simple Icons icon field to the menu. This module allows your CMS users to use almost any major brand icon that they like, without you having to source, optimize, and upload these logos yourself.

The icon is output as raw SVG markup so it can be easily styled with CSS, but the markup is sanitized before being output for security (just in case!)Įach icon is monochrome so fits easily into most designs and has been optimised for performance. I just want to have it simple and readable.īorder-radius: 50% 50% 50% 49% / 60% 52% 40% 40% Ĭan you explain me this and how can I come up with a solution to my problem? I'm stuck for hours and I just wanted to try it with pure HTML and CSS and not using photoshop.Simple Icons provides a field widget/field formatter and Twig function to output one of 789+ brand icons from the Simple Icons project. Currently, I am playing with HTML and CSS and I wanted to make a icon from this image
