CINXE.COM
Manual:コーディング規約/SVG - MediaWiki
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-disabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref--excluded vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Manual:コーディング規約/SVG - MediaWiki</title> <script>(function(){var className="client-js vector-feature-language-in-header-disabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref--excluded vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )mediawikiwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""], "wgDefaultDateFormat":"ja","wgMonthNames":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgRequestId":"d6cbd789-d08a-4665-aa25-6b1916942591","wgCanonicalNamespace":"Manual","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":100,"wgPageName":"Manual:Coding_conventions/SVG/ja","wgTitle":"Coding conventions/SVG/ja","wgCurRevisionId":6303207,"wgRevisionId":6303207,"wgArticleId":1268257,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Development guidelines/ja","SVG/ja"],"wgPageViewLanguage":"ja","wgPageContentLanguage":"ja","wgPageContentModel":"wikitext","wgRelevantPageName":"Manual:Coding_conventions/SVG/ja","wgRelevantArticleId":1268257,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"mediawiki","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault": true,"wgVisualEditor":{"pageLanguageCode":"ja","pageLanguageDir":"ltr","pageVariantFallbacks":"ja"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":30000,"wgTranslatePageTranslation":"translation","wgCentralAuthMobileDomain":false,"wgVisualEditorDisabledByHook":true,"wgULSPosition":"personal","wgULSisCompactLinksEnabled":true,"wgVector2022LanguageInHeader":false,"wgULSisLanguageSelectorEmpty":false,"wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"]};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.translate.tag.languages":"ready","ext.pygments":"ready","ext.cite.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons": "ready","ext.translate":"ready","ext.wikimediamessages.styles":"ready","ext.uls.pt":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.pygments.view","ext.cite.ux-enhancements","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.translate.pagetranslation.uls","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.compactlinks","ext.uls.interface","ext.checkUser.clientHints"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.cite.styles%7Cext.pygments%2Ctranslate%2CwikimediaBadges%7Cext.translate.tag.languages%7Cext.uls.pt%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:site_name" content="MediaWiki"> <meta property="og:title" content="Manual:コーディング規約/SVG - MediaWiki"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//m.mediawiki.org/wiki/Manual:Coding_conventions/SVG/ja"> <link rel="alternate" type="application/x-wiki" title="Edit" href="/w/index.php?title=Manual:Coding_conventions/SVG/ja&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/mediawiki.png"> <link rel="icon" href="/static/favicon/mediawiki.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="MediaWiki (en)"> <link rel="EditURI" type="application/rsd+xml" href="//www.mediawiki.org/w/api.php?action=rsd"> <link rel="canonical" href="https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG/ja"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"> <link rel="alternate" type="application/atom+xml" title="MediaWiki Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-100 ns-subject mw-editable page-Manual_Coding_conventions_SVG_ja rootpage-Manual_Coding_conventions skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/MediaWiki" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-mw-download" class="mw-list-item"><a href="/wiki/Download"><span>Get MediaWiki</span></a></li><li id="n-mw-extensions" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Category:Extensions"><span>Get extensions</span></a></li><li id="n-blog-text" class="mw-list-item"><a href="https://techblog.wikimedia.org/"><span>Tech blog</span></a></li><li id="n-mw-contribute" class="mw-list-item"><a href="/wiki/Special:MyLanguage/How_to_contribute"><span>Contribute</span></a></li> </ul> </div> </div> <div id="p-support" class="vector-menu mw-portlet mw-portlet-support" > <div class="vector-menu-heading"> Support </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Help:Contents" title="The place to find out"><span>User help</span></a></li><li id="n-mw-faq" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Manual:FAQ"><span>FAQ</span></a></li><li id="n-mw-manual" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Manual:Contents"><span>Technical manual</span></a></li><li id="n-mw-supportdesk" class="mw-list-item"><a href="/wiki/Project:Support_desk"><span>Support desk</span></a></li><li id="n-mw-communication" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Communication"><span>Communication</span></a></li> </ul> </div> </div> <div id="p-development" class="vector-menu mw-portlet mw-portlet-development" > <div class="vector-menu-heading"> Development </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mw-developerportal" class="mw-list-item"><a href="https://developer.wikimedia.org/"><span>Developer portal</span></a></li><li id="n-svn-statistics" class="mw-list-item"><a href="/wiki/Development_statistics"><span>Code statistics</span></a></li> </ul> </div> </div> <div id="p-mediawiki.org" class="vector-menu mw-portlet mw-portlet-mediawiki_org" > <div class="vector-menu-heading"> mediawiki.org </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-portal" class="mw-list-item"><a href="/wiki/Project:Help" title="About the project, what you can do, where to find things"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-mw-translate" class="mw-list-item"><a href="/wiki/Special:LanguageStats"><span>Translate content</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Load a random page [x]" accesskey="x"><span>Random page</span></a></li><li id="n-mw-discussion" class="mw-list-item"><a href="/wiki/Project:Village_Pump"><span>Village pump</span></a></li><li id="n-Sandboxlink-portlet-label" class="mw-list-item"><a href="/wiki/Project:Sandbox"><span>Sandbox</span></a></li> </ul> </div> </div> <div id="p-lang" class="vector-menu mw-portlet mw-portlet-lang" > <div class="vector-menu-heading"> In other languages </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-add wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:NewItem?site=mediawikiwiki&page=Manual%3ACoding+conventions%2FSVG%2Fja" title="Add interlanguage links" class="wbc-editpage">Add links</a></span></div> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/MediaWiki" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/mediawikiwiki.svg" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="MediaWiki" src="/static/images/mobile/copyright/mediawikiwiki-wordmark.svg" style="width: 7.5em; height: 1.125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search MediaWiki [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search MediaWiki" aria-label="Search MediaWiki" autocapitalize="sentences" title="Search MediaWiki [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-uls" class="mw-list-item active user-links-collapsible-item"><a data-mw="interface" href="#" class="uls-trigger cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet"><span class="vector-icon mw-ui-icon-wikimedia-language mw-ui-icon-wikimedia-wikimedia-language"></span> <span>English</span></a> </li> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/?utm_source=donate&utm_medium=sidebar&utm_campaign=spontaneous&uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&returnto=Manual%3ACoding+conventions%2FSVG%2Fja" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&returnto=Manual%3ACoding+conventions%2FSVG%2Fja" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="More options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/?utm_source=donate&utm_medium=sidebar&utm_campaign=spontaneous&uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=Manual%3ACoding+conventions%2FSVG%2Fja" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=Manual%3ACoding+conventions%2FSVG%2Fja" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">Beginning</div> </a> </li> <li id="toc-コードの構造" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#コードの構造"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>コードの構造</span> </div> </a> <ul id="toc-コードの構造-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-自動最適化_(SVGO)" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#自動最適化_(SVGO)"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>自動最適化 (SVGO)</span> </div> </a> <button aria-controls="toc-自動最適化_(SVGO)-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle 自動最適化 (SVGO) subsection</span> </button> <ul id="toc-自動最適化_(SVGO)-sublist" class="vector-toc-list"> <li id="toc-How_to_use" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#How_to_use"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>How to use</span> </div> </a> <ul id="toc-How_to_use-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Safe_plugins:" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Safe_plugins:"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Safe plugins:</span> </div> </a> <ul id="toc-Safe_plugins:-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-安全な構成例" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#安全な構成例"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>安全な構成例</span> </div> </a> <ul id="toc-安全な構成例-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-安全な構成例(.svgo.config.js)" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#安全な構成例(.svgo.config.js)"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>安全な構成例(.svgo.config.js)</span> </div> </a> <ul id="toc-安全な構成例(.svgo.config.js)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-安全な構成例(Gruntfile.js)" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#安全な構成例(Gruntfile.js)"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5</span> <span>安全な構成例(Gruntfile.js)</span> </div> </a> <ul id="toc-安全な構成例(Gruntfile.js)-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-手動最適化" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#手動最適化"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>手動最適化</span> </div> </a> <ul id="toc-手動最適化-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Other_tools" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Other_tools"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Other tools</span> </div> </a> <button aria-controls="toc-Other_tools-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Other tools subsection</span> </button> <ul id="toc-Other_tools-sublist" class="vector-toc-list"> <li id="toc-scour" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#scour"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>scour</span> </div> </a> <ul id="toc-scour-sublist" class="vector-toc-list"> <li id="toc-Description_and_history" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Description_and_history"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1.1</span> <span>Description and history</span> </div> </a> <ul id="toc-Description_and_history-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-How_to_use_2" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#How_to_use_2"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1.2</span> <span>How to use</span> </div> </a> <ul id="toc-How_to_use_2-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-safe_plugins" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#safe_plugins"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1.3</span> <span>safe plugins</span> </div> </a> <ul id="toc-safe_plugins-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-svgcleaner" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#svgcleaner"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2</span> <span>svgcleaner</span> </div> </a> <ul id="toc-svgcleaner-sublist" class="vector-toc-list"> <li id="toc-Description_and_history_2" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Description_and_history_2"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2.1</span> <span>Description and history</span> </div> </a> <ul id="toc-Description_and_history_2-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-How_to_use_3" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#How_to_use_3"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2.2</span> <span>How to use</span> </div> </a> <ul id="toc-How_to_use_3-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-safe_plugins_2" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#safe_plugins_2"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2.3</span> <span>safe plugins</span> </div> </a> <ul id="toc-safe_plugins_2-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading">Manual:コーディング規約/SVG</h1> <div class="mw-indicators"> <div id="mw-indicator-tpl-shortcut" class="mw-indicator"><div class="mw-parser-output"><div class="mw-parser-output"><style data-mw-deduplicate="TemplateStyles:r6605561">.mw-parser-output .tpl-badge{background-color:var(--background-color-progressive-subtle,#eaf3ff);color:var(--color-base,#202122);border-radius:10px;display:inline-block;font-size:90%;padding:5px 8px}</style><div class="tpl-badge">ショートカット: <a href="/wiki/CC/SVG" class="mw-redirect" title="CC/SVG"><b>CC/SVG</b></a></div></div></div></div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-manual" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Manual:Coding_conventions/SVG/ja" title="View the subject page [c]" accesskey="c"><span>Manual</span></a></li><li id="ca-talk" class="new vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Manual_talk:Coding_conventions/SVG/ja&action=edit&redlink=1" rel="discussion" class="new" title="Discussion about the content page (page does not exist) [t]" accesskey="t"><span>Discussion</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">日本語</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Manual:Coding_conventions/SVG/ja"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Special:Translate&group=page-Manual%3ACoding+conventions%2FSVG&action=page&filter=&language=ja" title="Edit this page [e]" accesskey="e"><span>Translate</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Manual:Coding_conventions/SVG/ja&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Manual:Coding_conventions/SVG/ja"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:Translate&group=page-Manual%3ACoding+conventions%2FSVG&action=page&filter=&language=ja" title="Edit this page [e]" accesskey="e"><span>Translate</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Manual:Coding_conventions/SVG/ja&action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Manual:Coding_conventions/SVG/ja" title="A list of all wiki pages that link here [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Manual:Coding_conventions/SVG/ja" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="//commons.wikimedia.org/wiki/Special:UploadWizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Manual:Coding_conventions/SVG/ja&oldid=6303207" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Manual:Coding_conventions/SVG/ja&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&page=Manual%3ACoding_conventions%2FSVG%2Fja&id=6303207&wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fwww.mediawiki.org%2Fwiki%2FManual%3ACoding_conventions%2FSVG%2Fja"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fwww.mediawiki.org%2Fwiki%2FManual%3ACoding_conventions%2FSVG%2Fja"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-create_a_book" class="mw-list-item"><a href="/w/index.php?title=Special:Book&bookcmd=book_creator&referer=Manual%3ACoding+conventions%2FSVG%2Fja"><span>Create a book</span></a></li><li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=Manual%3ACoding_conventions%2FSVG%2Fja&action=show-download-screen"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Manual:Coding_conventions/SVG/ja&printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects emptyPortlet" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div id="siteSub" class="noprint">From mediawiki.org</div> </div> <div id="contentSub"><div id="mw-content-subtitle"><div class="subpages">< <bdi dir="ltr"><a href="/wiki/Special:MyLanguage/Manual:Coding_conventions" title="Special:MyLanguage/Manual:Coding conventions">Manual:Coding conventions</a></bdi></div></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-pt-translate-header noprint" dir="ltr" lang="en">This page is a <span class="plainlinks"><a class="external text" href="https://www.mediawiki.org/w/index.php?title=Special:Translate&group=page-Manual%3ACoding+conventions%2FSVG&action=page&filter=&language=ja">translated version</a></span> of the page <a href="/wiki/Manual:Coding_conventions/SVG" title="Manual:Coding conventions/SVG">Manual:Coding conventions/SVG</a> and the translation is 12% complete.</div><div class="mw-content-ltr mw-parser-output" lang="ja" dir="ltr"><div class="mw-pt-languages noprint navigation-not-searchable" lang="en" dir="ltr"><div class="mw-pt-languages-label">Languages:</div><ul class="mw-pt-languages-list"><li><a href="/wiki/Manual:Coding_conventions/SVG/de" class="mw-pt-progress mw-pt-progress--low" title="Handbuch:Kodierungskonventionen/SVG (4% translated)" lang="de" dir="ltr">Deutsch</a></li> <li><a href="/wiki/Manual:Coding_conventions/SVG" class="mw-pt-languages-ui mw-pt-progress mw-pt-progress--complete" title="Manual:Coding conventions/SVG (100% translated)" lang="en" dir="ltr">English</a></li> <li><a href="/wiki/Manual:Coding_conventions/SVG/pl" class="mw-pt-progress mw-pt-progress--low" title="Manual:Coding conventions/SVG/pl (3% translated)" lang="pl" dir="ltr">polski</a></li> <li><a href="/wiki/Manual:Coding_conventions/SVG/pt-br" class="mw-pt-progress mw-pt-progress--low" title="Manual:Convenções de codificação/SVG (7% translated)" lang="pt-BR" dir="ltr">português do Brasil</a></li> <li><a href="/wiki/Manual:Coding_conventions/SVG/cs" class="mw-pt-progress mw-pt-progress--complete" title="Příručka:Konvence pro psaní kódu/SVG (100% translated)" lang="cs" dir="ltr">čeština</a></li> <li><a href="/wiki/Manual:Coding_conventions/SVG/bn" class="mw-pt-progress mw-pt-progress--low" title="নির্দেশিকা:কোডিং প্রচলন/এসভিজি (13% translated)" lang="bn" dir="ltr">বাংলা</a></li> <li><span class="mw-pt-languages-selected mw-pt-progress mw-pt-progress--low" lang="ja" dir="ltr">日本語</span></li></ul></div> <style data-mw-deduplicate="TemplateStyles:r6651108">.mw-parser-output table.ombox{margin:4px 10%;border-collapse:collapse;border:1px solid #a2a9b1;background-color:#f8f9fa;color:#333;box-sizing:border-box}.mw-parser-output .ombox td.mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ombox th.mbox-text,.mw-parser-output .ombox td.mbox-text{border:none;padding:0.25em 0.9em;width:100%}.mw-parser-output .ombox td.mbox-image{border:none;text-align:center;padding:2px 0 2px 0.9em}.mw-parser-output .ombox td.mbox-imageright{border:none;text-align:center;padding:2px 0.9em 2px 0}.mw-parser-output table.ombox-notice{border-color:#a2a9b1}.mw-parser-output table.ombox-speedy{background-color:#fee7e6;color:#333}.mw-parser-output table.ombox-speedy,.mw-parser-output table.ombox-delete{border-color:#b32424;border-width:2px}.mw-parser-output table.ombox-content{border-color:#f28500}.mw-parser-output table.ombox-style{border-color:#fc3}.mw-parser-output table.ombox-move{border-color:#9932cc}.mw-parser-output table.ombox-protection{border-color:#a2a9b1;border-width:2px}html body.mediawiki .mw-parser-output .ombox.mbox-small{clear:right;float:right;margin:4px 0 4px 1em;box-sizing:border-box;width:238px;font-size:88%;line-height:1.25em}@media screen{html.skin-theme-clientpref-night .mw-parser-output table.ombox{background-color:transparent;color:inherit}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output table.ombox{background-color:transparent;color:inherit}}</style><table class="ombox ombox-notice plainlinks" role="presentation"><tbody><tr><td class="mbox-image"><span typeof="mw:File"><span><img src="//upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/30px-OOjs_UI_icon_check-constructive.svg.png" decoding="async" width="30" height="30" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/45px-OOjs_UI_icon_check-constructive.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/60px-OOjs_UI_icon_check-constructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span></td><td class="mbox-text">このページでは、開発者の合意によって (または主任開発者 (lead developer) からの宣言によって) 長い時間をかけて作成されてきた、MediaWiki <a href="/wiki/Special:MyLanguage/Development_guidelines" title="Special:MyLanguage/Development guidelines">開発の指針</a>を文書化しています。</td></tr></tbody></table> <p>このページでは、<a href="/wiki/Special:MyLanguage/Manual:Code" title="Special:MyLanguage/Manual:Code">MediaWiki コードベース</a>の <b>SVG</b> で書かれたファイル内での<b>コーディング規約</b>を説明します。 SVG を含むすべてのプログラミング & マークアップ言語に適用される<a href="/wiki/Special:MyLanguage/Manual:Coding_conventions#All_languages" title="Special:MyLanguage/Manual:Coding conventions">全般的な規約</a>も参照してください。 </p><p>最適化ツールとして <a rel="nofollow" class="external text" href="https://github.com/svg/svgo">SVGO</a> を使用します。下記の<a href="#Automated_optimisation_(SVGO)">自動最適化</a>を参照してください。 </p> <div style="clear: right; margin-bottom: .5em; float: right; margin-left:2em; width: auto;"><meta property="mw:PageProp/toc" /></div> <p><span id="Code_structure"></span> </p> <div class="mw-heading mw-heading2"><h2 id="コードの構造"><span id=".E3.82.B3.E3.83.BC.E3.83.89.E3.81.AE.E6.A7.8B.E9.80.A0"></span>コードの構造</h2></div> <div lang="en" dir="ltr" class="mw-content-ltr"> <p>Minimal code as possible with readability in mind is the premise. </p> </div> <p><span lang="en" dir="ltr" class="mw-content-ltr">Example for simple optimised file</span> – <a href="https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/src/themes/wikimediaui/images/icons/subtract.svg" class="extiw" title="phab:diffusion/GOJU/browse/master/src/themes/wikimediaui/images/icons/subtract.svg">subtract.svg <span lang="en" dir="ltr" class="mw-content-ltr">from OOUI</span></a>: </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?xml version="1.0" encoding="UTF-8"?></span> <span class="nt"><svg</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://www.w3.org/2000/svg"</span><span class="w"> </span><span class="na">width=</span><span class="s">"20"</span><span class="w"> </span><span class="na">height=</span><span class="s">"20"</span><span class="w"> </span><span class="na">viewBox=</span><span class="s">"0 0 20 20"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><title></span> <span class="w"> </span>subtract <span class="w"> </span><span class="nt"></title></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">d=</span><span class="s">"M4 9h12v2H4z"</span><span class="nt">/></span> <span class="nt"></svg></span> </pre></div> <p><span lang="en" dir="ltr" class="mw-content-ltr">For minimalists, <i>exactly the same</i> can be drawn with</span> </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?xml version="1.0"?></span> <span class="nt"><svg</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://www.w3.org/2000/svg"</span><span class="w"> </span><span class="na">width=</span><span class="s">"20"</span><span class="w"> </span><span class="na">height=</span><span class="s">"20"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">d=</span><span class="s">"m4,9h12v2H4"</span><span class="nt">/></span> <span class="nt"></svg></span> </pre></div> <p><span lang="en" dir="ltr" class="mw-content-ltr">Example for slightly more complex, optimised file – BetaFeatures screenshot template:</span> </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?xml version="1.0" encoding="UTF-8"?></span> <span class="nt"><svg</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://www.w3.org/2000/svg"</span><span class="w"> </span><span class="na">width=</span><span class="s">"264"</span><span class="w"> </span><span class="na">height=</span><span class="s">"162"</span><span class="w"> </span><span class="na">viewBox=</span><span class="s">"0 0 264 162"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><title></span> <span class="w"> </span>BetaFeatures<span class="w"> </span>screenshot<span class="w"> </span>template <span class="w"> </span><span class="nt"></title></span> <span class="w"> </span><span class="nt"><defs></span> <span class="w"> </span><span class="nt"><clipPath</span><span class="w"> </span><span class="na">id=</span><span class="s">"jagged-edge"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">d=</span><span class="s">"M0 0v152l12 10 12-10 12 10 12-10 12 10 12-10 12 10 12-10 12 10 12-10 12 10 12-10 12 10 12-10 12 10 12-10 12 10 12-10 12 10 12-10 12 10 12-10V0z"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"></clipPath></span> <span class="w"> </span><span class="nt"></defs></span> <span class="w"> </span><span class="nt"><g</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#eaecf0"</span><span class="w"> </span><span class="na">clip-path=</span><span class="s">"url(#jagged-edge)"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">id=</span><span class="s">"background"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#fff"</span><span class="w"> </span><span class="na">d=</span><span class="s">"M0 0h264v162H0"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">id=</span><span class="s">"logo"</span><span class="w"> </span><span class="na">d=</span><span class="s">"M11 22c0-8 6-14 14-14s14 6 14 14-6 14-14 14-14-6-14-14M38 45v-5H13v5h25"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">id=</span><span class="s">"sidebar"</span><span class="w"> </span><span class="na">d=</span><span class="s">"M38 163V58H13v106h25"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">id=</span><span class="s">"personal-tools"</span><span class="w"> </span><span class="na">d=</span><span class="s">"M233 5h26v6h-26V5zM209 5h22v6h-22zM185 5h22v6h-22zM162 5h13v6h-13zM177 5h6v6h-6zM154 5h6v6h-6z"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">id=</span><span class="s">"search-input"</span><span class="w"> </span><span class="na">d=</span><span class="s">"M258 16v4h-92v-4h92m1-1h-94v6h94v-6z"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">id=</span><span class="s">"search-icon"</span><span class="w"> </span><span class="na">d=</span><span class="s">"M168 17h2v2h-2z"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">id=</span><span class="s">"article"</span><span class="w"> </span><span class="na">d=</span><span class="s">"M252 162V29H48v133z"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">id=</span><span class="s">"border"</span><span class="w"> </span><span class="na">d=</span><span class="s">"M0 0v162h264V0zm1 1h262v150.533l-11 9.166-12-10-12 10-12-10-12 10-12-10-12 10-12-10-12 10-12-10-12 10-12-10-12 10-12-10-12 10-12-10-12 10-12-10-12 10-12-10-12 10-11-9z"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"></g></span> <span class="nt"></svg></span> </pre></div> <div lang="en" dir="ltr" class="mw-content-ltr"> <p>We will explain the different coding conventions in the following section. </p> </div> <p><span id="Automated_optimisation_(SVGO)"></span> </p> <div class="mw-heading mw-heading2"><h2 id="自動最適化_(SVGO)"><span id=".E8.87.AA.E5.8B.95.E6.9C.80.E9.81.A9.E5.8C.96_.28SVGO.29"></span>自動最適化 (SVGO)</h2></div> <p><span lang="en" dir="ltr" class="mw-content-ltr">SVGO was maintained by Kir Belevich (deepsweet<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>) and Lev Solntsev (GreLI<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>) from August 2012<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> to 2016<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> and since 2021 by Bogdan Chadkin (TrySound<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>).</span> </p> <div lang="en" dir="ltr" class="mw-content-ltr"> <div class="mw-heading mw-heading3"><h3 id="How_to_use">How to use</h3></div> </div> <p><span lang="en" dir="ltr" class="mw-content-ltr">Is it recommended to install <code>svgo</code> from <a rel="nofollow" class="external free" href="https://github.com/svg/svgo">https://github.com/svg/svgo</a> or from <code>npm</code> for the command line.</span> <span lang="en" dir="ltr" class="mw-content-ltr">There is also an in-browser demo to help with preview and general understanding of the tool at <a rel="nofollow" class="external free" href="https://jakearchibald.github.io/svgomg/">https://jakearchibald.github.io/svgomg/</a>.</span> <span lang="en" dir="ltr" class="mw-content-ltr">This should not be used to create production files however.</span> </p> <div lang="en" dir="ltr" class="mw-content-ltr"> <div class="mw-heading mw-heading3"><h3 id="Safe_plugins:">Safe plugins:</h3></div> </div> <p><span lang="en" dir="ltr" class="mw-content-ltr">As some SVGO default plugins (options) might result in unexpected appearance with more complex SVGs, we differentiate between safe, considerably less-safe and unsafe plugins.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Set the "transformPrecision" at least to 7 to reduce the rist of breaking files.</span><sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> <span lang="en" dir="ltr" class="mw-content-ltr">When using unsafe plugins it's recommended to verify before and after diffing per file to ensure visual quality.</span> </p><p><span lang="en" dir="ltr" class="mw-content-ltr">Mentioning only plugins, that are changed from default setting or that might be counter-intuitive:</span> </p> <ul><li><span lang="en" dir="ltr" class="mw-content-ltr">Sorting attributes <code>sortAttrs</code>.</span><br /><span lang="en" dir="ltr" class="mw-content-ltr">Enable by setting to <code class="mw-highlight mw-highlight-lang-php mw-content-ltr" style="" dir="ltr"><span class="k">true</span></code>; disabled by default</span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">Remove or cleanup <code>enable-background</code> attribute when possible <code>cleanupEnableBackground</code>.</span><br /><span lang="en" dir="ltr" class="mw-content-ltr">Deprecated attribute, only supported by IE/Edge; enabled by default</span></li></ul> <p><span lang="en" dir="ltr" class="mw-content-ltr">See <a rel="nofollow" class="external text" href="https://github.com/svg/svgo">SVGO Readme for other enabled, safe plugins</a>.</span> </p><p><b><span lang="en" dir="ltr" class="mw-content-ltr">Plugins to consider carefully:</span></b>  </p> <table class="wikitable"> <tbody><tr> <td><code>cleanupIDs</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">Remove unused and minify used IDs</span><br /><span lang="en" dir="ltr" class="mw-content-ltr">Might negatively affect readability<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> and breaks some files<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>; enabled by default</span> </td></tr> <tr> <td><code>removeRasterImages</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">As general rule dangerous, could cause data loss, some raster-images are difficult to spot</span><sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup>; <span lang="en" dir="ltr" class="mw-content-ltr">disabled by default</span> </td></tr> <tr> <td><code>inlineStyles</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">Some users prefer to use CSS than inlineStyles, can reduce editability</span><sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>removeDoctype</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">For SVG 1.1 there is not reason to remove it, however for the upcommong SVG2-draft it will be deapreciated</span><sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> </td></tr></tbody></table> <p><b><span lang="en" dir="ltr" class="mw-content-ltr">Unsafe rules to disable (don't use!):</span></b> </p> <table class="wikitable"> <tbody><tr> <td><code>convertPathData</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">Might cause (i) imprecise rendering, (ii) wrong rendering by librsvg<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup>, (iii) breaking files<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup>; enabled by default</span> </td></tr> <tr> <td><code>cleanupListOfValues</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">Round/rewrite number lists breaks Wikimedia-renderin</span><sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>convertShapeToPath</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr"> can reduce readability</span><sup id="cite_ref-notConvert_18-0" class="reference"><a href="#cite_note-notConvert-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup> <span lang="en" dir="ltr" class="mw-content-ltr">and breaks files</span><sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>removeXMLProcInst</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">Remove XML processing instructions, aka XML declaration</span><sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup> <code class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><span class="cp"><?xml version="1.0" encoding="UTF-8"?></span></code> <br /><span lang="en" dir="ltr" class="mw-content-ltr">Issues when viewed as standalone file in some editors, also possible issues with MIME type interpretation</span><br /><span lang="en" dir="ltr" class="mw-content-ltr">Example: If the SVG doesn't start with an XML declaration, then its MIME type will be detected as <code>text/plain</code> rather than <code>image/svg+xml</code> by libmagic and consequently, MediaWiki's CSSMin CSS minifier.</span> <span lang="en" dir="ltr" class="mw-content-ltr">libmagic's default database currently requires that <a rel="nofollow" class="external text" href="https://github.com/threatstack/libmagic/blob/master/magic/Magdir/sgml#L5">SVGs contain an XML declaration</a>; disable by setting to <code class="mw-highlight mw-highlight-lang-php mw-content-ltr" style="" dir="ltr"><span class="k">false</span></code>; enabled by default</span> </td></tr> <tr> <td><code>removeTitle</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">Remove <code class="mw-highlight" style="white-space:nowrap"><span class="p">‎<</span><span class="nt">title</span><span class="p">></span></code></span> <br /><span lang="en" dir="ltr" class="mw-content-ltr">Problematic for accessibility reasons<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup>; set to <code class="mw-highlight mw-highlight-lang-php mw-content-ltr" style="" dir="ltr"><span class="k">false</span></code>; enabled by default</span> </td></tr> <tr> <td><code>removeDesc</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">Remove <code class="mw-highlight" style="white-space:nowrap"><span class="p">‎<</span><span class="nt">desc</span><span class="p">></span></code></span><br /><span lang="en" dir="ltr" class="mw-content-ltr">Problematic for accessibility reasons; set to <code class="mw-highlight mw-highlight-lang-php mw-content-ltr" style="" dir="ltr"><span class="k">false</span></code>; enabled by default</span> </td></tr> <tr> <td><code>removeViewBox</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">Remove <code>viewBox</code> attribute</span><br /><span lang="en" dir="ltr" class="mw-content-ltr">Results in troublesome appearance in some browsers, therefore both, <code>width</code>/<code>height</code> and <code>viewbox</code> should be featured; set to <code class="mw-highlight mw-highlight-lang-php mw-content-ltr" style="" dir="ltr"><span class="k">false</span></code>; enabled by default</span> </td></tr> <tr> <td><code>removeDimensions</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">Remove dimensions <code>width</code>/<code>height</code> when <code>viewbox</code> is available</span><br /><span lang="en" dir="ltr" class="mw-content-ltr">As above; set to <code class="mw-highlight mw-highlight-lang-php mw-content-ltr" style="" dir="ltr"><span class="k">false</span></code>; disabled by default</span> </td></tr> <tr> <td><code>removeMetadata</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">Possible Copyright-Information</span><sup id="cite_ref-invalidkept_23-0" class="reference"><a href="#cite_note-invalidkept-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>removeHiddenElems</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">Possible reference lines, editor data, real text before convertion, Copyright-informations</span><sup id="cite_ref-invalidkept_23-1" class="reference"><a href="#cite_note-invalidkept-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>removeUnknownsAndDefaults</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">removes <a href="https://commons.wikimedia.org/wiki/User:JoKalliauer/RepairFlowRoot" class="extiw" title="c:User:JoKalliauer/RepairFlowRoot">Flow-Text</a></span> <sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>cleanupNumericValues</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">breaks some files</span> <sup id="cite_ref-25" class="reference"><a href="#cite_note-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>minifyStyles</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">breaks some files</span><sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>removeComments</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">reduces readability and possible removes reference lines, editor data, real text before convertion, Copyright-informations</span><sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>removeEditorsNSData</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">reduces editability with GUI-SVG-Editors</span><sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>collapseGroups</code> </td> <td>reduced readability and editability <sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup> and breaks some files<sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>removeStyleElement</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">breaks some files</span><sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>removeOffCanvasPaths</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">breaks some files</span><sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span class="cite-bracket">[</span>32<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>removeEmptyContainers</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">breaks some files</span><sup id="cite_ref-33" class="reference"><a href="#cite_note-33"><span class="cite-bracket">[</span>33<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-34" class="reference"><a href="#cite_note-34"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>removeElementsByAttr</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">breaks some files</span><sup id="cite_ref-35" class="reference"><a href="#cite_note-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>convertStyleToAttrs</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">breaks some files</span><sup id="cite_ref-36" class="reference"><a href="#cite_note-36"><span class="cite-bracket">[</span>36<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>convertTransform</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">breaks some files</span><sup id="cite_ref-37" class="reference"><a href="#cite_note-37"><span class="cite-bracket">[</span>37<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-38" class="reference"><a href="#cite_note-38"><span class="cite-bracket">[</span>38<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-39" class="reference"><a href="#cite_note-39"><span class="cite-bracket">[</span>39<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-40" class="reference"><a href="#cite_note-40"><span class="cite-bracket">[</span>40<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>cleanupNumericValues</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">breaks some files</span> <sup id="cite_ref-41" class="reference"><a href="#cite_note-41"><span class="cite-bracket">[</span>41<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>inlineStyles</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">breaks some CSS-features</span><sup id="cite_ref-42" class="reference"><a href="#cite_note-42"><span class="cite-bracket">[</span>42<span class="cite-bracket">]</span></a></sup> </td></tr> <tr> <td><code>reusePaths</code> </td> <td><span lang="en" dir="ltr" class="mw-content-ltr">breaks some files</span> <sup id="cite_ref-43" class="reference"><a href="#cite_note-43"><span class="cite-bracket">[</span>43<span class="cite-bracket">]</span></a></sup> </td></tr></tbody></table> <p><br /> <span id="Exemplified_safe_configuration"></span> </p> <div class="mw-heading mw-heading3"><h3 id="安全な構成例"><span id=".E5.AE.89.E5.85.A8.E3.81.AA.E6.A7.8B.E6.88.90.E4.BE.8B"></span>安全な構成例</h3></div> <p>これはsvgo v1.x用であることに注意してください。v2.xでは異なるCLI引数を取ります。 </p><p><code>$ svgo path/to/image.svg --disable={cleanupIDs,convertPathData,removeDesc,removeTitle,removeViewBox,removeXMLProcInst} --enable='sortAttrs' --pretty --final-newline</code> </p><p>人間が読みやすいコードには <code>pretty</code> 出力を使用し、その過程でコードをタブでインデントします。 </p><p><span id="Exemplified_safe_configuration_(.svgo.config.js)"></span> </p> <div class="mw-heading mw-heading3"><h3 id="安全な構成例(.svgo.config.js)"><span id=".E5.AE.89.E5.85.A8.E3.81.AA.E6.A7.8B.E6.88.90.E4.BE.8B.28.svgo.config.js.29"></span>安全な構成例(.svgo.config.js)</h3></div> <p><b>2023年6月</b> - <span lang="en" dir="ltr" class="mw-content-ltr">SVGO v3.0.0+ compatibility, amending to new <code>cleanupIds</code> plugin name.</span> (<a href="https://phabricator.wikimedia.org/T324899" class="extiw" title="phab:T324899">phab:T324899</a>) </p><p><b>2022年1月</b> - <span lang="en" dir="ltr" class="mw-content-ltr">NPM run scripts enabled SVGO configuration.</span> (<a href="https://phabricator.wikimedia.org/T246321" class="extiw" title="phab:T246321">phab:T246321</a>) </p> <div class="mw-highlight mw-highlight-lang-js mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">/**</span> <span class="cm"> * SVGO Configuration</span> <span class="cm"> * Compatible to v3.0.0+</span> <span class="cm"> * 推奨オプション:</span> <span class="cm"> * https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG#Exemplified_safe_configuration</span> <span class="cm"> */</span> <span class="s1">'use strict'</span><span class="p">;</span> <span class="nx">module</span><span class="p">.</span><span class="nx">exports</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nx">plugins</span><span class="o">:</span><span class="w"> </span><span class="p">[</span> <span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="c1">// Set of built-in plugins enabled by default.</span> <span class="w"> </span><span class="nx">name</span><span class="o">:</span><span class="w"> </span><span class="s1">'preset-default'</span><span class="p">,</span> <span class="w"> </span><span class="nx">params</span><span class="o">:</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nx">overrides</span><span class="o">:</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nx">cleanupIds</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span> <span class="w"> </span><span class="nx">removeDesc</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span> <span class="w"> </span><span class="nx">removeTitle</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span> <span class="w"> </span><span class="nx">removeViewBox</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span> <span class="w"> </span><span class="c1">// SVG の冒頭に XML 宣言を書かないと、libmagicは自動処理でMIME 種別を "image/svg+xml" ではなく "text/plain" と検出して、その結果、MediaWikiの CSSMin CSS 圧縮機能だと判断します。</span> <span class="w"> </span><span class="c1">// libmagicに対する既定のデータベースの要件により、現状では SVG 画像に次のような XML 宣言を書き込みます。</span> <span class="w"> </span><span class="c1">// https://github.com/threatstack/libmagic/blob/master/magic/Magdir/sgml#L5</span> <span class="w"> </span><span class="nx">removeXMLProcInst</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// https://phabricator.wikimedia.org/T327446</span> <span class="w"> </span><span class="nx">convertPathData</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// https://github.com/svg/svgo/issues/880 https://github.com/svg/svgo/issues/1487</span> <span class="w"> </span><span class="nx">removeMetadata</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// Copyright-Violation</span> <span class="w"> </span><span class="nx">removeHiddenElems</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// source for converted text2path</span> <span class="w"> </span><span class="nx">removeUnknownsAndDefaults</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// removes Flow-Text: https://commons.wikimedia.org/wiki/User:JoKalliauer/RepairFlowRoot</span> <span class="w"> </span><span class="nx">cleanupNumericValues</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// https://github.com/svg/svgo/issues/1080</span> <span class="w"> </span><span class="nx">minifyStyles</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">//https://github.com/svg/svgo/issues/888</span> <span class="w"> </span><span class="nx">removeComments</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">//reduces readability</span> <span class="w"> </span><span class="nx">removeEditorsNSData</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// https://github.com/svg/svgo/issues/1096</span> <span class="w"> </span><span class="nx">collapseGroups</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// https://github.com/svg/svgo/issues/1057</span> <span class="w"> </span><span class="nx">removeOffCanvasPaths</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">//https://github.com/svg/svgo/issues/1732</span> <span class="w"> </span><span class="nx">removeEmptyContainers</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// https://github.com/svg/svgo/issues/1194 https://github.com/svg/svgo/issues/1618</span> <span class="w"> </span><span class="nx">convertTransform</span><span class="o">:</span><span class="w"> </span><span class="nx">fasle</span><span class="w"> </span><span class="c1">// https://github.com/svg/svgo/issues/988 https://github.com/svg/svgo/issues/1021</span> <span class="w"> </span><span class="nx">cleanupNumericValues</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// https://github.com/svg/svgo/issues/1080</span> <span class="w"> </span><span class="nx">inlineStyles</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// https://github.com/svg/svgo/issues/1486</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="p">},</span> <span class="w"> </span><span class="s1">'removeRasterImages'</span><span class="p">,</span> <span class="w"> </span><span class="s1">'sortAttrs'</span> <span class="w"> </span><span class="p">],</span> <span class="w"> </span><span class="c1">// Set whitespace according to Wikimedia Coding Conventions.</span> <span class="w"> </span><span class="c1">// @see https://github.com/svg/svgo/blob/main/lib/stringifier.js#L39 for available options.</span> <span class="w"> </span><span class="nx">js2svg</span><span class="o">:</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nx">eol</span><span class="o">:</span><span class="w"> </span><span class="s1">'lf'</span><span class="p">,</span> <span class="w"> </span><span class="nx">finalNewline</span><span class="o">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span> <span class="w"> </span><span class="c1">// タブでインデント処理ができるように設定 (既定でスペース4個)、ここでは '--pretty' を使って処理。</span> <span class="w"> </span><span class="nx">indent</span><span class="o">:</span><span class="w"> </span><span class="s2">"\t"</span><span class="p">,</span> <span class="w"> </span><span class="nx">pretty</span><span class="o">:</span><span class="w"> </span><span class="kc">true</span> <span class="w"> </span><span class="p">},</span> <span class="w"> </span><span class="nx">multipass</span><span class="o">:</span><span class="w"> </span><span class="kc">true</span> <span class="p">}</span> </pre></div> <p><span id="Exemplified_safe_configuration_(Gruntfile.js)"></span> </p> <div class="mw-heading mw-heading3"><h3 id="安全な構成例(Gruntfile.js)"><span id=".E5.AE.89.E5.85.A8.E3.81.AA.E6.A7.8B.E6.88.90.E4.BE.8B.28Gruntfile.js.29"></span>安全な構成例(Gruntfile.js)</h3></div> <pre lang="js">svgmin: { options: { js2svg: { indent: '\t', pretty: true }, plugins: [ { cleanupIDs: false }, { removeDesc: false }, { removeRasterImages: true }, { removeTitle: false }, { removeViewBox: false }, { removeXMLProcInst: false }, { sortAttrs: true }, { convertPathData: false // https://github.com/svg/svgo/issues/880 }, { removeMetadata: false // Copyright-Violation }, { removeHiddenElems: false // source for converted text2path }, { removeUnknownsAndDefaults: false // removes Flow-Text }, { cleanupNumericValues: false // https://github.com/svg/svgo/issues/1080 }, { minifyStyles: false //https://github.com/svg/svgo/issues/888 }, { removeComments: false //reduces readability }, { removeEditorsNSData: false // https://github.com/svg/svgo/issues/1096 }, { collapseGroups: false // https://github.com/svg/svgo/issues/1057 }, { removeOffCanvasPaths: false //https://github.com/svg/svgo/issues/1732 }, { removeEmptyContainers:false // https://github.com/svg/svgo/issues/1194 https://github.com/svg/svgo/issues/1618 }, { convertTransform: fasle // https://github.com/svg/svgo/issues/988 https://github.com/svg/svgo/issues/1021 }, { cleanupNumericValues: false // https://github.com/svg/svgo/issues/1080 }, { inlineStyles: false // https://github.com/svg/svgo/issues/1486 } ] } } </pre> <p><span id="Manual_optimisation"></span> </p> <div class="mw-heading mw-heading2"><h2 id="手動最適化"><span id=".E6.89.8B.E5.8B.95.E6.9C.80.E9.81.A9.E5.8C.96"></span>手動最適化</h2></div> <div lang="en" dir="ltr" class="mw-content-ltr"> <p>Beyond automated optimising SVGs there are further steps to consider: </p> </div> <ul><li><span lang="en" dir="ltr" class="mw-content-ltr">retain the following code <code>xml:space="preserve"</code>, <code><!--</code>, <code><title</code>, <code>\n</code>, <code>\r</code>, <code>\t</code>, <code><g</code>, <code>visibility="hidden"</code>, <code>opacity="0"</code>, <code>display="none"</code>, <code>requiredFeatures="</code>, <code><?xml version="1.0" encoding="UTF-8"?></code>, <code class="mw-highlight" style="white-space:nowrap"><span class="p">‎<</span><span class="nt">defs</span><span class="p">></span></code>, <code><rect</code>, <code><style type="text/css"</code>, <code> class="</code>, <code>data-name=</code>, <code>inkscape:label</code>, <code><rdf:RDF</code>, <code>aria-label=</code>, <code><inkscape:grid</code>, <code><sodipodi:guide</code>, <code>sodipodi:cx=</code>, <code>sodipodi:cy=</code>, <code>sodipodi:rx=</code>, <code>sodipodi:ry=</code>, <code>sodipodi:type="arc"</code>, <code>vector-effect=</code>, <code>inkscape:groupmode="layer"</code>, <code>inkscape:label=</code>, <code>sodipodi:role="line"</code>, see <a href="https://commons.wikimedia.org/wiki/Help:SVG_guidelines#When_is_optimizing/validating_files_undesired?" class="extiw" title="c:Help:SVG guidelines">c:Help:SVG guideline</a></span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">Remove <code>standalone="no"</code> from XML processing instruction, as it's default</span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">Lowercase (for better gzipping) and shorten hex color values, if possible, e.g. <code>#fff</code> instead of <code>#FFFFFF</code>.</span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">Attributes that are the same for a group of elements can be applied to a common parent <code class="mw-highlight" style="white-space:nowrap"><span class="p">‎<</span><span class="nt">g</span><span class="p">></span></code> instead, or sometimes even specified by the <code><svg</code> statement (see an example: <a href="https://commons.wikimedia.org/wiki/File_talk:CHE_Bettens_COA.svg" class="extiw" title="c:File talk:CHE Bettens COA.svg">CHE Bettens COA.svg</a>).</span><br /><span lang="en" dir="ltr" class="mw-content-ltr">This might reduce the editability or readability</span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">Rely on defaults like <code>fill="#000"</code> and <code>stroke-width="1"</code>.</span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">The <code class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><span class="p"><</span><span class="nt">path</span> <span class="na">d</span><span class="o">=</span><span class="s">"…"</span><span class="p">/></span></code> syntax is almost always shorter than the syntax of basic shapes like <code class="mw-highlight" style="white-space:nowrap"><span class="p">‎<</span><span class="nt">polygon</span><span class="p">></span></code> or even <code class="mw-highlight" style="white-space:nowrap"><span class="p">‎<</span><span class="nt">rect</span><span class="p">></span></code>, however <code class="mw-highlight" style="white-space:nowrap"><span class="p">‎<</span><span class="nt">circle</span><span class="p">></span></code>, <code class="mw-highlight" style="white-space:nowrap"><span class="p">‎<</span><span class="nt">ellipse</span><span class="p">></span></code>, <code class="mw-highlight" style="white-space:nowrap"><span class="p">‎<</span><span class="nt">rect</span><span class="p">></span></code> are generally more easy to read/edit, therfore there is generally prefered to use more specific ones.</span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">Merge <code class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><span class="p"><</span><span class="nt">path</span> <span class="na">d</span><span class="o">=</span><span class="s">"…"</span><span class="p">/></span></code> elements where applicable.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Do not do that if the both path should be edited speratly.</span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">Do not remove redundant <code>ry="…"</code> attribute when identical to <code>rx="…"</code> it get's more difficult to read/edit.</span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">Remove not needed <code>fill-rule="…"</code> and <code>clip-rule="…"</code>.</span> <span lang="en" dir="ltr" class="mw-content-ltr">These rules only have an effect on certain paths, e.g. when a path intersects itself.</span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">Look for <a href="https://en.wikipedia.org/wiki/IEEE_754" class="extiw" title="w:IEEE 754">IEEE</a> rounding errors like <code>0.999999998</code> or <code>1.000000003</code>.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Such numbers take up space without providing any additional information.</span> <span lang="en" dir="ltr" class="mw-content-ltr">They can almost always be cut off without visually changing anything.</span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">Work with a non-fractional pixel grid while drawing, and align as much points as possible on this grid.</span> <span lang="en" dir="ltr" class="mw-content-ltr">These points have a much higher chance of being represented as short integer numbers in the resulting code.</span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">Pick a non-fractional grid so that it matches the features of an existing image, and scale or redraw shapes so that as many points as possible fall on the grid.</span> <span lang="en" dir="ltr" class="mw-content-ltr">The result might be misaligned and can be cropped using <code>viewBox="<i><left> <top> <width> <height></i>"</code>.</span></li></ul> <p><span lang="en" dir="ltr" class="mw-content-ltr">If you want to dig even deeper, there are <a rel="nofollow" class="external text" href="https://blog.usejournal.com/of-svg-minification-and-gzip-21cd26a5d007">more optimisations to compress delivery</a>, such as:</span> </p> <ul><li><span lang="en" dir="ltr" class="mw-content-ltr">auto-closing paths (aka removing <code>z</code> for certain shapes),</span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">use relative commands when creating paths (instead of absolute commands, e.g. "m" for "move by", instead of "M" for "move to"),</span></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">optimising for compression backreferences</span></li></ul> <div lang="en" dir="ltr" class="mw-content-ltr"> <div class="mw-heading mw-heading2"><h2 id="Other_tools">Other tools</h2></div> </div> <p><span lang="en" dir="ltr" class="mw-content-ltr">Other tools that may be helpful to know about:</span> </p> <ol><li><a class="external text" href="https://svgworkaroundbot.toolforge.org/">SvgWorkAroundBot</a></li> <li><a rel="nofollow" class="external text" href="https://jakearchibald.github.io/svgomg/">SVGOMG</a></li> <li><a rel="nofollow" class="external text" href="https://github.com/scour-project/scour">scour</a></li> <li><a rel="nofollow" class="external text" href="https://github.com/RazrFalcon/svgcleaner">svgcleaner</a></li> <li><span lang="en" dir="ltr" class="mw-content-ltr">check <a href="https://commons.wikimedia.org/wiki/Help:SVG_guidelines#How_to_optimize" class="extiw" title="commons:Help:SVG guidelines">Help:SVG guidelines#How to optimize</a> for more options.</span></li></ol> <div lang="en" dir="ltr" class="mw-content-ltr"> <div class="mw-heading mw-heading3"><h3 id="scour">scour</h3></div> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> <div class="mw-heading mw-heading4"><h4 id="Description_and_history">Description and history</h4></div> </div> <p><span lang="en" dir="ltr" class="mw-content-ltr">This optimizer was one of the first optimizers:</span> <span lang="en" dir="ltr" class="mw-content-ltr">Since 2009 it included with the installation of Inkscape, it can be used by saving Inkscape-files with "Optimized Inkscape SVG", and in 2013<sup id="cite_ref-45" class="reference"><a href="#cite_note-45"><span class="cite-bracket">[</span>45<span class="cite-bracket">]</span></a></sup> seperated into an self-contained project available at <a rel="nofollow" class="external free" href="https://github.com/scour-project/scour">https://github.com/scour-project/scour</a>.</span> <span lang="en" dir="ltr" class="mw-content-ltr">It is maintained by the Inscape-Developer Patrick Storz (Ede123).</span><sup id="cite_ref-44" class="reference"><a href="#cite_note-44"><span class="cite-bracket">[</span>44<span class="cite-bracket">]</span></a></sup> </p> <div lang="en" dir="ltr" class="mw-content-ltr"> <div class="mw-heading mw-heading4"><h4 id="How_to_use_2">How to use</h4></div> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> <p>You can use in the browser at <a class="external free" href="https://svgworkaroundbot.toolforge.org/">https://svgworkaroundbot.toolforge.org/</a> or install it via <code>pip install scour</code> from the command line (Linux-PC/Mac-PC/Windows). </p> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> <div class="mw-heading mw-heading4"><h4 id="safe_plugins">safe plugins</h4></div> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> <p>Scour is a very cautious optimizer, however some plugins can still be break the file or remove important non-visible parts, to be on the safe side you can use <code>scour -i input.svg -o output.svg --disable-simplify-colors --disable-style-to-xml --disable-group-collapsing --keep-editor-data --keep-unreferenced-defs --protect-ids-noninkscape --disable-embed-rasters --set-precision=8 --set-c-precision=8</code> </p> </div> <div class="mw-heading mw-heading3"><h3 id="svgcleaner">svgcleaner</h3></div> <div lang="en" dir="ltr" class="mw-content-ltr"> <div class="mw-heading mw-heading4"><h4 id="Description_and_history_2">Description and history</h4></div> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> <p>This optimizer was developed from Jan 2012 to 2022 by Yevhenii Reizner. </p> </div><p><sup id="cite_ref-46" class="reference"><a href="#cite_note-46"><span class="cite-bracket">[</span>46<span class="cite-bracket">]</span></a></sup> </p><p><span lang="en" dir="ltr" class="mw-content-ltr">It focusses on following the current w3c-Standards (SVG1.1).</span><sup id="cite_ref-47" class="reference"><a href="#cite_note-47"><span class="cite-bracket">[</span>47<span class="cite-bracket">]</span></a></sup> <span lang="en" dir="ltr" class="mw-content-ltr">Compared to scour or svgo it breaks less files<sup id="cite_ref-48" class="reference"><a href="#cite_note-48"><span class="cite-bracket">[</span>48<span class="cite-bracket">]</span></a></sup>, reduces the file size more<sup id="cite_ref-49" class="reference"><a href="#cite_note-49"><span class="cite-bracket">[</span>49<span class="cite-bracket">]</span></a></sup> and the performance is magnitues faster.</span><sup id="cite_ref-50" class="reference"><a href="#cite_note-50"><span class="cite-bracket">[</span>50<span class="cite-bracket">]</span></a></sup> </p> <div lang="en" dir="ltr" class="mw-content-ltr"> <div class="mw-heading mw-heading4"><h4 id="How_to_use_3">How to use</h4></div> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> <p>You can use in the browser at <a class="external free" href="https://svgworkaroundbot.toolforge.org/">https://svgworkaroundbot.toolforge.org/</a> or download it from <a rel="nofollow" class="external free" href="https://github.com/RazrFalcon/svgcleaner-gui/releases">https://github.com/RazrFalcon/svgcleaner-gui/releases</a> . </p> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> <div class="mw-heading mw-heading4"><h4 id="safe_plugins_2">safe plugins</h4></div> </div> <p><span lang="en" dir="ltr" class="mw-content-ltr">Files will be treated according to the standards, however sometimes file non-svg-elements which are important for reading and/or editing the file, to be on the safe side you can use <code>svgcleaner input.svg output.svg --allow-bigger-file --indent yes --resolve-use no --apply-transform-to-gradients yes --apply-transform-to-shapes yes --convert-shapes no --group-by-style no --join-arcto-flags no --join-style-attributes no --merge-gradients yes --regroup-gradient-stops yes --remove-comments no --remove-declarations no --remove-default-attributes yes --remove-desc no --remove-dupl-cmd-in-paths yes --remove-dupl-fegaussianblur yes --remove-dupl-lineargradient yes --remove-dupl-radialgradient yes --remove-gradient-attributes yes --remove-invalid-stops yes --remove-invisible-elements no --remove-metadata no --remove-needless-attributes yes --remove-nonsvg-attributes no --remove-nonsvg-elements no --remove-text-attributes no --remove-title no --remove-unreferenced-ids no --remove-unresolved-classes yes --remove-unused-coordinates yes --remove-unused-defs yes --remove-version yes --remove-xmlns-xlink-attribute yes --simplify-transforms yes --trim-colors yes --trim-ids no --trim-paths yes --ungroup-defs yes --ungroup-groups no --use-implicit-cmds yes --list-separator comma --paths-to-relative yes --remove-unused-segments yes --convert-segments yes --apply-transform-to-paths yes --coordinates-precision 2 --paths-coordinates-precision 5 --properties-precision 3 --transforms-precision 7</code></span> </p> <div lang="en" dir="ltr" class="mw-content-ltr"> <div class="mw-heading mw-heading2"><h2 id="References">References</h2></div> </div> <div class="mw-references-wrap mw-references-columns"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/deepsweet">https://github.com/deepsweet</a></span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><a href="#cite_ref-2">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/GreLI">https://github.com/GreLI</a></span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><a href="#cite_ref-3">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/commit/b1f3a62809e5b6f73c4ebae4bc792cb18f5ce6c5">https://github.com/svg/svgo/commit/b1f3a62809e5b6f73c4ebae4bc792cb18f5ce6c5</a></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><a href="#cite_ref-4">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://github.com/svg/svgo/issues/1055">Still maintained?</a></span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><a href="#cite_ref-5">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://github.com/svg/svgo/issues/1320">Call for new maintainer(s)</a></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><a href="#cite_ref-6">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/TrySound">https://github.com/TrySound</a></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><a href="#cite_ref-7">↑</a></span> <span class="reference-text"> <a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1021">https://github.com/svg/svgo/issues/1021</a></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><a href="#cite_ref-8">↑</a></span> <span class="reference-text"><a href="https://commons.wikimedia.org/wiki/Help:SVG_guidelines#Invalid_elements_that_should_be_replaced" class="extiw" title="c:Help:SVG guidelines">c:Help:SVG_guidelines#Invalid elements that should be replaced</a> (id=)</span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><a href="#cite_ref-9">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1195">https://github.com/svg/svgo/issues/1195</a></span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><a href="#cite_ref-10">↑</a></span> <span class="reference-text"><span lang="en" dir="ltr" class="mw-content-ltr"><a href="https://commons.wikimedia.org/wiki/Help:SVG_guidelines#Optimizing_SVGs_that_have_already_been_uploaded" class="extiw" title="c:Help:SVG guidelines">c:Help:SVG_guidelines#Optimizing SVGs that have already been uploaded</a> (You should not change the appearance of the picture, see <a href="/wiki/File:Oxygen15.04.1-computer-laptop.svg" title="File:Oxygen15.04.1-computer-laptop.svg">File:Oxygen15.04.1-computer-laptop.svg</a>)</span></span> </li> <li id="cite_note-11"><span class="mw-cite-backlink"><a href="#cite_ref-11">↑</a></span> <span class="reference-text"><a href="https://commons.wikimedia.org/wiki/Help:SVG_guidelines#Elements_that_should_not_be_converted" class="extiw" title="c:Help:SVG guidelines">c:Help:SVG_guidelines#Elements that should not be converted</a> (<span lang="en" dir="ltr" class="mw-content-ltr">CSS should in general not be converted</span>)</span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><a href="#cite_ref-12">↑</a></span> <span class="reference-text"><a href="https://commons.wikimedia.org/wiki/Help:SVG_guidelines#Useless_elements_that_should_be_kept" class="extiw" title="c:Help:SVG guidelines">c:Help:SVG_guidelines#Useless elements that should be kept</a>; <span lang="en" dir="ltr" class="mw-content-ltr">there are different opinions about it, but it is necessary for <a rel="nofollow" class="external free" href="https://validator.w3.org/">https://validator.w3.org/</a>.</span></span> </li> <li id="cite_note-13"><span class="mw-cite-backlink"><a href="#cite_ref-13">↑</a></span> <span class="reference-text"><a href="https://phabricator.wikimedia.org/T217990" class="extiw" title="phab:T217990">phab:T217990</a></span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><a href="#cite_ref-14">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/880">https://github.com/svg/svgo/issues/880</a></span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><a href="#cite_ref-15">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1487">https://github.com/svg/svgo/issues/1487</a></span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><a href="#cite_ref-16">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1493">https://github.com/svg/svgo/issues/1493</a></span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><a href="#cite_ref-17">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1402">https://github.com/svg/svgo/issues/1402</a></span> </li> <li id="cite_note-notConvert-18"><span class="mw-cite-backlink"><a href="#cite_ref-notConvert_18-0">↑</a></span> <span class="reference-text"><a href="https://commons.wikimedia.org/wiki/Help:SVG_guidelines#Elements_that_should_not_be_converted" class="extiw" title="c:Help:SVG guidelines">c:Help:SVG_guidelines#Elements that should not be converted</a> (<span lang="en" dir="ltr" class="mw-content-ltr">rect should often not be converted to path</span>)</span> </li> <li id="cite_note-19"><span class="mw-cite-backlink"><a href="#cite_ref-19">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1402">https://github.com/svg/svgo/issues/1402</a></span> </li> <li id="cite_note-20"><span class="mw-cite-backlink"><a href="#cite_ref-20">↑</a></span> <span class="reference-text"><a href="https://phabricator.wikimedia.org/T327446" class="extiw" title="phab:T327446">phab:T327446</a></span> </li> <li id="cite_note-21"><span class="mw-cite-backlink"><a href="#cite_ref-21">↑</a></span> <span class="reference-text"><a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons:Commons_SVG_Checker&withJS=MediaWiki:CommonsSvgChecker.js">https://commons.wikimedia.org/w/index.php?title=Commons:Commons_SVG_Checker&withJS=MediaWiki:CommonsSvgChecker.js</a> (<span lang="en" dir="ltr" class="mw-content-ltr">WARNING: XML declaration not found and is strongly recommended</span>)</span> </li> <li id="cite_note-22"><span class="mw-cite-backlink"><a href="#cite_ref-22">↑</a></span> <span class="reference-text"><a href="https://commons.wikimedia.org/wiki/Help:SVG_guidelines#Useless_elements_that_should_be_kept" class="extiw" title="c:Help:SVG guidelines">c:Help:SVG_guidelines#Useless elements that should be kept</a>; <span lang="en" dir="ltr" class="mw-content-ltr">titles are used to describe/name the file.</span></span> </li> <li id="cite_note-invalidkept-23"><span class="mw-cite-backlink">↑ <sup><a href="#cite_ref-invalidkept_23-0">23.0</a></sup> <sup><a href="#cite_ref-invalidkept_23-1">23.1</a></sup></span> <span class="reference-text"><a href="https://commons.wikimedia.org/wiki/Help:SVG_guidelines#Invalid_elements_that_should_be_kept" class="extiw" title="c:Help:SVG guidelines">c:Help:SVG_guidelines#Invalid elements that should be kept</a></span> </li> <li id="cite_note-24"><span class="mw-cite-backlink"><a href="#cite_ref-24">↑</a></span> <span class="reference-text"><a href="https://commons.wikimedia.org/wiki/Help:SVG_guidelines#Invalid_elements_that_should_be_replaced" class="extiw" title="c:Help:SVG guidelines">c:Help:SVG_guidelines#Invalid elements that should be replaced</a>; (<span lang="en" dir="ltr" class="mw-content-ltr">removes Flowtext</span>)</span> </li> <li id="cite_note-25"><span class="mw-cite-backlink"><a href="#cite_ref-25">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1080">https://github.com/svg/svgo/issues/1080</a></span> </li> <li id="cite_note-26"><span class="mw-cite-backlink"><a href="#cite_ref-26">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/888">https://github.com/svg/svgo/issues/888</a></span> </li> <li id="cite_note-27"><span class="mw-cite-backlink"><a href="#cite_ref-27">↑</a></span> <span class="reference-text"><a href="https://commons.wikimedia.org/wiki/Help:SVG_guidelines#Useless_elements_that_should_be_kept" class="extiw" title="c:Help:SVG guidelines">c:Help:SVG_guidelines#Useless elements that should be kept</a> (<span lang="en" dir="ltr" class="mw-content-ltr">comments explain things in the source code</span>)</span> </li> <li id="cite_note-28"><span class="mw-cite-backlink"><a href="#cite_ref-28">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1096">https://github.com/svg/svgo/issues/1096</a>; <span lang="en" dir="ltr" class="mw-content-ltr">keep grid and guide</span></span> </li> <li id="cite_note-29"><span class="mw-cite-backlink"><a href="#cite_ref-29">↑</a></span> <span class="reference-text"><a href="https://commons.wikimedia.org/wiki/Help:SVG_guidelines#Useless_elements_that_should_be_kept" class="extiw" title="c:Help:SVG guidelines">c:Help:SVG_guidelines#Useless elements that should be kept</a> (<span lang="en" dir="ltr" class="mw-content-ltr">Groups are used to group elements.</span>)</span> </li> <li id="cite_note-30"><span class="mw-cite-backlink"><a href="#cite_ref-30">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1057">https://github.com/svg/svgo/issues/1057</a></span> </li> <li id="cite_note-31"><span class="mw-cite-backlink"><a href="#cite_ref-31">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/946">https://github.com/svg/svgo/issues/946</a></span> </li> <li id="cite_note-32"><span class="mw-cite-backlink"><a href="#cite_ref-32">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1732">https://github.com/svg/svgo/issues/1732</a></span> </li> <li id="cite_note-33"><span class="mw-cite-backlink"><a href="#cite_ref-33">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1194">https://github.com/svg/svgo/issues/1194</a></span> </li> <li id="cite_note-34"><span class="mw-cite-backlink"><a href="#cite_ref-34">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1618">https://github.com/svg/svgo/issues/1618</a></span> </li> <li id="cite_note-35"><span class="mw-cite-backlink"><a href="#cite_ref-35">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/945">https://github.com/svg/svgo/issues/945</a></span> </li> <li id="cite_note-36"><span class="mw-cite-backlink"><a href="#cite_ref-36">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1735">https://github.com/svg/svgo/issues/1735</a></span> </li> <li id="cite_note-37"><span class="mw-cite-backlink"><a href="#cite_ref-37">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/988">https://github.com/svg/svgo/issues/988</a></span> </li> <li id="cite_note-38"><span class="mw-cite-backlink"><a href="#cite_ref-38">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1021">https://github.com/svg/svgo/issues/1021</a></span> </li> <li id="cite_note-39"><span class="mw-cite-backlink"><a href="#cite_ref-39">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1222">https://github.com/svg/svgo/issues/1222</a></span> </li> <li id="cite_note-40"><span class="mw-cite-backlink"><a href="#cite_ref-40">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1268">https://github.com/svg/svgo/issues/1268</a></span> </li> <li id="cite_note-41"><span class="mw-cite-backlink"><a href="#cite_ref-41">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1080">https://github.com/svg/svgo/issues/1080</a></span> </li> <li id="cite_note-42"><span class="mw-cite-backlink"><a href="#cite_ref-42">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1486">https://github.com/svg/svgo/issues/1486</a></span> </li> <li id="cite_note-43"><span class="mw-cite-backlink"><a href="#cite_ref-43">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/svg/svgo/issues/1733">https://github.com/svg/svgo/issues/1733</a></span> </li> <li id="cite_note-44"><span class="mw-cite-backlink"><a href="#cite_ref-44">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/Ede123">https://github.com/Ede123</a></span> </li> <li id="cite_note-45"><span class="mw-cite-backlink"><a href="#cite_ref-45">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/scour-project/scour/commits/master?after=0609c596766ec98e4e2092b49bd03b802702ba1a+279&branch=master&qualified_name=refs%2Fheads%2Fmaster">https://github.com/scour-project/scour/commits/master?after=0609c596766ec98e4e2092b49bd03b802702ba1a+279&branch=master&qualified_name=refs%2Fheads%2Fmaster</a></span> </li> <li id="cite_note-46"><span class="mw-cite-backlink"><a href="#cite_ref-46">↑</a></span> <span class="reference-text"> <a rel="nofollow" class="external free" href="https://github.com/RazrFalcon">https://github.com/RazrFalcon</a></span> </li> <li id="cite_note-47"><span class="mw-cite-backlink"><a href="#cite_ref-47">↑</a></span> <span class="reference-text"> <a rel="nofollow" class="external free" href="https://www.w3.org/TR/SVG11/">https://www.w3.org/TR/SVG11/</a></span> </li> <li id="cite_note-48"><span class="mw-cite-backlink"><a href="#cite_ref-48">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/RazrFalcon/svgcleaner#cleaning-ratio">https://github.com/RazrFalcon/svgcleaner#cleaning-ratio</a></span> </li> <li id="cite_note-49"><span class="mw-cite-backlink"><a href="#cite_ref-49">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/RazrFalcon/svgcleaner#cleaning-ratio">https://github.com/RazrFalcon/svgcleaner#cleaning-ratio</a></span> </li> <li id="cite_note-50"><span class="mw-cite-backlink"><a href="#cite_ref-50">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/RazrFalcon/svgcleaner#cleaning-time">https://github.com/RazrFalcon/svgcleaner#cleaning-time</a></span> </li> </ol></div> <div class="navbox-styles nomobile"><style data-mw-deduplicate="TemplateStyles:r6230902">.mw-parser-output .navbox{border:1px solid #aaa;box-sizing:border-box;width:100%;margin:auto;clear:both;font-size:88%;text-align:center;padding:1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox th,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{text-align:center;padding-left:1em;padding-right:1em}.mw-parser-output th.navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background:#fdfdfd}.mw-parser-output .navbox-list{border-color:#fdfdfd}.mw-parser-output .navbox th,.mw-parser-output .navbox-title{background:#eaeeff}.mw-parser-output .navbox-abovebelow,.mw-parser-output th.navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background:#ddddff}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background:#e6e6ff}.mw-parser-output .navbox-even{background:#f7f7f7}.mw-parser-output .navbox-odd{background:transparent}.mw-parser-output th.navbox-title1{border-left:2px solid #fdfdfd;width:100%}.mw-parser-output td.navbox-list1{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .hlist dd,.mw-parser-output .navbox .hlist dt,.mw-parser-output .navbox .hlist li{white-space:nowrap}.mw-parser-output .navbox .hlist dd dl,.mw-parser-output .navbox .hlist dt dl,.mw-parser-output .navbox .hlist li ol,.mw-parser-output .navbox .hlist li ul{white-space:normal}.mw-parser-output ol+.navbox-styles+.navbox,.mw-parser-output ul+.navbox-styles+.navbox{margin-top:0.5em}</style></div><div role="navigation" class="navbox" aria-labelledby="開発の指針" style="border: 1px solid #aaa; padding: 3px;;padding:3px"><table class="nowraplinks hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r6387430">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li,.mw-parser-output .hlist .mw-empty-elt{display:none}.mw-parser-output .hlist dt:after{content:": "}.mw-parser-output .hlist dd:after,.mw-parser-output .hlist li:after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child:after,.mw-parser-output .hlist dt:last-child:after,.mw-parser-output .hlist li:last-child:after{content:none}.mw-parser-output .hlist dd dd:first-child:before,.mw-parser-output .hlist dd dt:first-child:before,.mw-parser-output .hlist dd li:first-child:before,.mw-parser-output .hlist dt dd:first-child:before,.mw-parser-output .hlist dt dt:first-child:before,.mw-parser-output .hlist dt li:first-child:before,.mw-parser-output .hlist li dd:first-child:before,.mw-parser-output .hlist li dt:first-child:before,.mw-parser-output .hlist li li:first-child:before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child:after,.mw-parser-output .hlist dd dt:last-child:after,.mw-parser-output .hlist dd li:last-child:after,.mw-parser-output .hlist dt dd:last-child:after,.mw-parser-output .hlist dt dt:last-child:after,.mw-parser-output .hlist dt li:last-child:after,.mw-parser-output .hlist li dd:last-child:after,.mw-parser-output .hlist li dt:last-child:after,.mw-parser-output .hlist li li:last-child:after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li:before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child:before,.mw-parser-output .hlist dt ol>li:first-child:before,.mw-parser-output .hlist li ol>li:first-child:before{content:" ("counter(listitem)"\a0 "}</style><style data-mw-deduplicate="TemplateStyles:r4692751">.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar ul{display:inline;white-space:nowrap}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em;width:6em}</style><div class="plainlinks hlist navbar mini"><ul><li class="nv-view"><a href="/wiki/Template:Development_guidelines_navigation" title="Template:Development guidelines navigation"><abbr title="View this template" style=";;background:none transparent;border:none;box-shadow:none; padding:0;">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Development_guidelines_navigation" title="Template talk:Development guidelines navigation"><abbr title="Discuss this template" style=";;background:none transparent;border:none;box-shadow:none; padding:0;">t</abbr></a></li><li class="nv-edit"><a class="external text" href="https://www.mediawiki.org/w/index.php?title=Template:Development_guidelines_navigation&action=edit"><abbr title="Edit this template" style=";;background:none transparent;border:none;box-shadow:none; padding:0;">e</abbr></a></li></ul></div><div id="開発の指針" style="font-size:114%;margin:0 4em"><a href="/wiki/Special:MyLanguage/Development_guidelines" title="Special:MyLanguage/Development guidelines"><span style="font-weight: bold;">開発の指針</span></a><span style="display:none"><a href="/wiki/Development_guidelines" title="Development guidelines"> </a></span></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">方針</th><td class="navbox-list1 navbox-list navbox-odd" style="width:100%;padding:0px"><div style="padding:0em 0.25em"> <ul><li><a href="/wiki/Special:MyLanguage/Development_policy" title="Special:MyLanguage/Development policy">開発の方針</a><span style="display:none"><a href="/wiki/Development_policy" title="Development policy"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Wikimedia_Engineering_Architecture_Principles" title="Special:MyLanguage/Wikimedia Engineering Architecture Principles"><span lang="en" dir="ltr" class="mw-content-ltr">Architecture principles</span></a><span style="display:none"><a href="/wiki/Wikimedia_Engineering_Architecture_Principles" title="Wikimedia Engineering Architecture Principles"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Wikimedia_services_policy" title="Special:MyLanguage/Wikimedia services policy">サービスの方針</a><span style="display:none"><a href="/wiki/Wikimedia_services_policy" title="Wikimedia services policy"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Support_policy_for_PHP" title="Special:MyLanguage/Support policy for PHP">PHPのサポート方針</a><span style="display:none"><a href="/wiki/Support_policy_for_PHP" title="Support policy for PHP"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Gerrit/Privilege_policy" title="Special:MyLanguage/Gerrit/Privilege policy">Gerrit/特権方針</a><span style="display:none"><a href="/wiki/Gerrit/Privilege_policy" title="Gerrit/Privilege policy"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Stable_interface_policy" title="Special:MyLanguage/Stable interface policy">安定版インターフェイスの方針</a><span style="display:none"><a href="/wiki/Stable_interface_policy" title="Stable interface policy"> </a></span> <ul><li><a href="/wiki/Special:MyLanguage/Stable_interface_policy/Frontend" title="Special:MyLanguage/Stable interface policy/Frontend">フロントエンド</a><span style="display:none"><a href="/wiki/Stable_interface_policy/Frontend" title="Stable interface policy/Frontend"> </a></span></li></ul></li> <li><a href="/wiki/Special:MyLanguage/MediaWiki_database_policy" title="Special:MyLanguage/MediaWiki database policy">MediaWiki のデータベースの方針</a><span style="display:none"><a href="/wiki/MediaWiki_database_policy" title="MediaWiki database policy"> </a></span></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">全般的なガイドライン</th><td class="navbox-list1 navbox-list navbox-even" style="width:100%;padding:0px"><div style="padding:0em 0.25em"> <ul><li><a href="/wiki/Special:MyLanguage/Security_for_developers" title="Special:MyLanguage/Security for developers">開発者向けセキュリティ</a><span style="display:none"><a href="/wiki/Security_for_developers" title="Security for developers"> </a></span></li> <li><a href="https://wikitech.wikimedia.org/wiki/Performance/Guides/Backend_performance_practices" class="extiw" title="wikitech:Performance/Guides/Backend performance practices">パフォーマンスの指針</a></li> <li><a href="/wiki/Special:MyLanguage/Gerrit/Commit_message_guidelines" title="Special:MyLanguage/Gerrit/Commit message guidelines">コミット メッセージの指針</a><span style="display:none"><a href="/wiki/Gerrit/Commit_message_guidelines" title="Gerrit/Commit message guidelines"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Security_checklist_for_developers" title="Special:MyLanguage/Security checklist for developers">開発者向けセキュリティ チェックリスト</a><span style="display:none"><a href="/wiki/Security_checklist_for_developers" title="Security checklist for developers"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Localisation" title="Special:MyLanguage/Localisation">地域化(多言語への対応)</a><span style="display:none"><a href="/wiki/Localisation" title="Localisation"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Design/Living_style_guide" title="Special:MyLanguage/Design/Living style guide">設計のスタイル ガイド</a><span style="display:none"><a href="/wiki/Design/Living_style_guide" title="Design/Living style guide"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Documentation/Style_guide" title="Special:MyLanguage/Documentation/Style guide">説明文書/スタイル ガイド</a><span style="display:none"><a href="/wiki/Documentation/Style_guide" title="Documentation/Style guide"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Accessibility_guide_for_developers" title="Special:MyLanguage/Accessibility guide for developers">開発者向けアクセシビリティ ガイド</a><span style="display:none"><a href="/wiki/Accessibility_guide_for_developers" title="Accessibility guide for developers"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Inclusive_language" title="Special:MyLanguage/Inclusive language">包括的言語</a><span style="display:none"><a href="/wiki/Inclusive_language" title="Inclusive language"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Guidelines_for_a_healthy_code_review_culture" title="Special:MyLanguage/Guidelines for a healthy code review culture">健全なコード レビュー文化のための指針</a><span style="display:none"><a href="/wiki/Guidelines_for_a_healthy_code_review_culture" title="Guidelines for a healthy code review culture"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Collaborative_programming" title="Special:MyLanguage/Collaborative programming">協働プログラミング</a><span style="display:none"><a href="/wiki/Collaborative_programming" title="Collaborative programming"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Best_practices_for_extensions" title="Special:MyLanguage/Best practices for extensions">拡張機能の最善手法</a><span style="display:none"><a href="/wiki/Best_practices_for_extensions" title="Best practices for extensions"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Manual:Pre-commit_checklist" title="Special:MyLanguage/Manual:Pre-commit checklist">コミット前のチェックリスト</a><span style="display:none"><a href="/wiki/Manual:Pre-commit_checklist" title="Manual:Pre-commit checklist"> </a></span></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">コーディング規約</th><td class="navbox-list1 navbox-list navbox-odd" style="width:100%;padding:0px"><div style="padding:0em 0.25em"> <ul><li><a href="/wiki/Special:MyLanguage/Manual:Coding_conventions#Code_structure" title="Special:MyLanguage/Manual:Coding conventions">すべての言語</a><span style="display:none"><a href="/wiki/Manual:Coding_conventions#Code_structure" title="Manual:Coding conventions"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Manual:Coding_conventions/PHP" title="Special:MyLanguage/Manual:Coding conventions/PHP">PHP</a><span style="display:none"><a href="/wiki/Manual:Coding_conventions/PHP" title="Manual:Coding conventions/PHP"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Manual:PHP_unit_testing/Writing_unit_tests#Test_conventions" title="Special:MyLanguage/Manual:PHP unit testing/Writing unit tests">PHPUnit テスト規約</a><span style="display:none"><a href="/wiki/Manual:PHP_unit_testing/Writing_unit_tests#Test_conventions" title="Manual:PHP unit testing/Writing unit tests"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Manual:Coding_conventions/JavaScript" title="Special:MyLanguage/Manual:Coding conventions/JavaScript">JavaScript</a><span style="display:none"><a href="/wiki/Manual:Coding_conventions/JavaScript" title="Manual:Coding conventions/JavaScript"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Manual:Coding_conventions/CSS" title="Special:MyLanguage/Manual:Coding conventions/CSS">CSS</a><span style="display:none"><a href="/wiki/Manual:Coding_conventions/CSS" title="Manual:Coding conventions/CSS"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Manual:Coding_conventions/Selenium" title="Special:MyLanguage/Manual:Coding conventions/Selenium">Selenium</a><span style="display:none"><a href="/wiki/Manual:Coding_conventions/Selenium" title="Manual:Coding conventions/Selenium"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Manual:Coding_conventions/Lua" title="Special:MyLanguage/Manual:Coding conventions/Lua">Lua</a><span style="display:none"><a href="/wiki/Manual:Coding_conventions/Lua" title="Manual:Coding conventions/Lua"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Manual:Coding_conventions/Python" title="Special:MyLanguage/Manual:Coding conventions/Python">Python</a><span style="display:none"><a href="/wiki/Manual:Coding_conventions/Python" title="Manual:Coding conventions/Python"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Manual:Coding_conventions/Java" title="Special:MyLanguage/Manual:Coding conventions/Java">Java</a><span style="display:none"><a href="/wiki/Manual:Coding_conventions/Java" title="Manual:Coding conventions/Java"> </a></span></li> <li><b><a href="/wiki/Special:MyLanguage/Manual:Coding_conventions/SVG" title="Special:MyLanguage/Manual:Coding conventions/SVG">SVG</a></b><span style="display:none"><a href="/wiki/Manual:Coding_conventions/SVG" title="Manual:Coding conventions/SVG"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Manual:Coding_conventions/Vue" title="Special:MyLanguage/Manual:Coding conventions/Vue">Vue</a><span style="display:none"><a href="/wiki/Manual:Coding_conventions/Vue" title="Manual:Coding conventions/Vue"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Manual:Coding_conventions/Database" title="Special:MyLanguage/Manual:Coding conventions/Database">データベース スキーマ</a><span style="display:none"><a href="/wiki/Manual:Coding_conventions/Database" title="Manual:Coding conventions/Database"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Product_Analytics/Style_guide" title="Special:MyLanguage/Product Analytics/Style guide"><span lang="en" dir="ltr" class="mw-content-ltr">Analytics (Python, R, SQL)</span></a><span style="display:none"><a href="/wiki/Product_Analytics/Style_guide" title="Product Analytics/Style guide"> </a></span></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">API クライアント コード</th><td class="navbox-list1 navbox-list navbox-even" style="width:100%;padding:0px"><div style="padding:0em 0.25em"> <ul><li><a href="/wiki/Special:MyLanguage/API:Client_code/Gold_standard" title="Special:MyLanguage/API:Client code/Gold standard">API クライアント ライブラリの標準</a><span style="display:none"><a href="/wiki/API:Client_code/Gold_standard" title="API:Client code/Gold standard"> </a></span></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">草稿:</th><td class="navbox-list1 navbox-list navbox-odd" style="width:100%;padding:0px"><div style="padding:0em 0.25em"> <ul><li><i><a href="/wiki/Special:MyLanguage/Manual:Coding_conventions/Documentation" title="Special:MyLanguage/Manual:Coding conventions/Documentation">コードの説明文書</a><span style="display:none"><a href="/wiki/Manual:Coding_conventions/Documentation" title="Manual:Coding conventions/Documentation"> </a></span></i></li></ul> </div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐api‐int.codfw.main‐55b5456bcb‐l5d7f Cached time: 20241120181720 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] CPU time usage: 0.681 seconds Real time usage: 0.898 seconds Preprocessor visited node count: 5548/1000000 Post‐expand include size: 61997/2097152 bytes Template argument size: 12842/2097152 bytes Highest expansion depth: 17/100 Expensive parser function count: 52/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 47400/5000000 bytes Lua time usage: 0.228/10.000 seconds Lua memory usage: 2276482/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 692.593 1 -total 52.52% 363.771 1 Template:Conventions_navigation 51.68% 357.966 1 Template:Navbox 41.58% 287.968 36 Template:Ll 27.52% 190.598 72 Template:Translatable 16.81% 116.402 74 Template:Pagelang 11.40% 78.935 8 Template:Tmpl 5.42% 37.569 1 Template:Development_guideline 4.93% 34.152 1 Template:Mbox 3.97% 27.465 13 Template:TNTN --> <!-- Saved in parser cache with key mediawikiwiki:pcache:idhash:1268257-0!canonical and timestamp 20241120181720 and revision id 6303207. Rendering was triggered because: api-parse --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://www.mediawiki.org/w/index.php?title=Manual:Coding_conventions/SVG/ja&oldid=6303207">https://www.mediawiki.org/w/index.php?title=Manual:Coding_conventions/SVG/ja&oldid=6303207</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Special:Categories" title="Special:Categories">Categories</a>: <ul><li><a href="/wiki/Category:Development_guidelines/ja" title="Category:Development guidelines/ja">Development guidelines/ja</a></li><li><a href="/wiki/Category:SVG/ja" title="Category:SVG/ja">SVG/ja</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 10 January 2024, at 21:09.</li> <li id="footer-info-copyright">Text is available under the <a rel="nofollow" class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-ShareAlike License</a>; additional terms may apply. Text in <a class="external text" href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents">the Help: namespace</a> is available under the <a rel="nofollow" class="external text" href="https://creativecommons.org/publicdomain/zero/1.0/">Creative Commons CC0 License</a>. By using this site, you agree to the <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">Terms of Use</a> and <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy Policy</a>.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Project:About">About mediawiki.org</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Project:General_disclaimer">Disclaimers</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/www.mediawiki.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//m.mediawiki.org/w/index.php?title=Manual:Coding_conventions/SVG/ja&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-f69cdc8f6-7zkrf","wgBackendResponseTime":275,"wgPageParseReport":{"limitreport":{"cputime":"0.681","walltime":"0.898","ppvisitednodes":{"value":5548,"limit":1000000},"postexpandincludesize":{"value":61997,"limit":2097152},"templateargumentsize":{"value":12842,"limit":2097152},"expansiondepth":{"value":17,"limit":100},"expensivefunctioncount":{"value":52,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":47400,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 692.593 1 -total"," 52.52% 363.771 1 Template:Conventions_navigation"," 51.68% 357.966 1 Template:Navbox"," 41.58% 287.968 36 Template:Ll"," 27.52% 190.598 72 Template:Translatable"," 16.81% 116.402 74 Template:Pagelang"," 11.40% 78.935 8 Template:Tmpl"," 5.42% 37.569 1 Template:Development_guideline"," 4.93% 34.152 1 Template:Mbox"," 3.97% 27.465 13 Template:TNTN"]},"scribunto":{"limitreport-timeusage":{"value":"0.228","limit":"10.000"},"limitreport-memusage":{"value":2276482,"limit":52428800}},"cachereport":{"origin":"mw-api-int.codfw.main-55b5456bcb-l5d7f","timestamp":"20241120181720","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>