Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
}

.show-file-icons.chat-inline-anchor-widget .icon::before {
--file-icon-mask-position: center;
--file-icon-mask-size: contain;

display: inline-block;
line-height: 100%;
overflow: hidden;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export class FileIconThemeLoader {

// When usesCurrentColor is set, image icons are rendered as masks filled with the current text color
const imageIconStyle = (iconPath: css.CssFragment): css.CssFragment => iconThemeDocument.usesCurrentColor
? css.inline`background-color: currentColor; background-image: none; mask: ${iconPath} no-repeat left center; mask-size: 16px; -webkit-mask: ${iconPath} no-repeat left center; -webkit-mask-size: 16px;`
? css.inline`background-color: currentColor; background-image: none; mask: ${iconPath} no-repeat var(--file-icon-mask-position, left center); mask-size: var(--file-icon-mask-size, 16px); -webkit-mask: ${iconPath} no-repeat var(--file-icon-mask-position, left center); -webkit-mask-size: var(--file-icon-mask-size, 16px);`
: css.inline`background-image: ${iconPath};`;

for (const defId in selectorByDefinitionId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ suite('FileIconThemeData', () => {
assert.deepStrictEqual({
backgroundColor: content?.includes('background-color: currentColor'),
mask: content?.includes('mask: url('),
maskPlacement: content?.includes('no-repeat left center'),
maskSize: content?.includes('mask-size: 16px'),
maskPlacement: content?.includes('no-repeat var(--file-icon-mask-position, left center)'),
maskSize: content?.includes('mask-size: var(--file-icon-mask-size, 16px)'),
webkitMask: content?.includes('-webkit-mask: url('),
webkitMaskSize: content?.includes('-webkit-mask-size: 16px'),
webkitMaskSize: content?.includes('-webkit-mask-size: var(--file-icon-mask-size, 16px)'),
noBackgroundImage: content?.includes('background-image: none')
}, {
backgroundColor: true,
Expand Down
Loading