[[|]]

{{i}} Документація шаблону[перегляд] [редагувати] [історія] [очистити кеш]

Шаблон схожий на Шаблон:ПрапорТекст крім того, що назви країн розташовані коректно зі значками прапорів різної ширини, для використання наз списком. Для отримання інформації дивіться документація Шаблона:ПрапорТекст.

ПрикладиРедагувати

Приклад списка країн з шаблоном {{ПрапорТекст}} Приклад списка країн з шаблоном {{flaglist}}

How it worksРедагувати

{{ПрапорТекст}} generates a flag icon, a non-breaking space and the country link, which means the alignment of the link depends on the width of the flag image. The default size for flag icons is 23x15px, so the icon width is 23px for long flags but smaller for more squarish flags such as those of Сан-Маріно and Нігер (any flag with an aspect ratio less than 2315 ≈ 1.53), misaligning the country links next to them. The {{Flag/core}} template, used internally by {{flag}}, compensates for this for Непал, Vatican City and Швейцарія by inserting some extra spaces, though for several other countries the link is still shifted too far to the left, as seen above.

{{Flaglist}} puts a flag icon inside an invisible <span> box with a fixed width calculated by Module:Flaglist/size. The width does not depend on the exact dimensions of the image, but does vary with the maximum width and height specified using extended image syntax. The default size for most countries' flags is 23x15px; the |size= parameter can be used if a different size is wanted. Some entities have different defaults specified within their data templates and may output misaligned links even if |size= is not used.

If a maximum width is specified (whether both width and height, e.g. 20x10px, or width only, e.g. 20px), either using the |size= parameter or the data template default, the box size is equal to this width plus seven pixels. If a height is specified but a width is not (x10px), a box width of 2.2 times the height plus seven pixels is used. In the latter case, flags with an aspect ratio greater than 2.2 (the only such current national flag being that of Катар) may extend beyond the invisible box and overlap the country link at certain sizes, as seen in the table below. For this reason, if an icon size different from the default is wanted, it is best to always specify both a width and a height. This also ensures that neither squarish nor long flags are rendered much bigger than other flags.

Usage with custom sizeРедагувати

|розмір= значення {{ПрапорТекст}} вигляд {{flaglist}} вигляд
10px
x8px
10x8px
35px
x25px
35x25px