Skip to content

Instantly share code, notes, and snippets.

View kaelig's full-sized avatar

Kaelig Deloumeau-Prigent kaelig

View GitHub Profile
@kaelig
kaelig / nudge-typescript-convert.yml
Created October 12, 2022 08:24
GitHub Action to nudge contributors to convert JavaScript files to TypeScript
on:
pull_request:
paths:
- '**.js'
- '**.jsx'
- '**.ts'
- '**.tsx'
name: TypeScript conversion nudge
jobs:
Nudge-to-convert-to-TypeScript-if-JavaScript-found:
<input
type="text"
<!-- Present the control as a select -->
role="combobox"
<!-- Self-label the field using the placeholder -->
placeholder="Search unicorns"
id="search-field"
aria-labelledby="search-field"
<!-- Link to the suggestions listbox -->
aria-owns="suggestions"
@kaelig
kaelig / safe-get-function.scss
Created September 13, 2016 05:54
Safe get-function in Sass 3.3.x and up
// Simplified version of safe-get-function
// Full code: https://github.com/kaelig/sass-safe-get-function
@function safe-get-function($name) {
@if function-exists('get-function') {
@return get-function($name);
} @else {
@return $name;
}
}
@kaelig
kaelig / slds-button.html
Created August 1, 2016 18:49
SLDS Button HTML Import
<!--
https://www.lightningdesignsystem.com/components/buttons/
-->
<template id="slds-button-template">
<style>
:host {
/* Examples of custom properties */
--color-text-link-hover: #005fb2;
--color-text-link-active: #00396b;
}
@kaelig
kaelig / SassMeister-input.scss
Created February 23, 2016 21:40
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
@import 'mq';
$hidpi: (-webkit-min-device-pixel-ratio: 1.3), (min-resolution: 120dpi), (min-resolution: 1.3dppx);
@include mq($and: $hidpi) {
.test { foo: bar }
@kaelig
kaelig / SassMeister-input.scss
Created January 18, 2016 08:47
Generated by SassMeister.com.
// ----
// libsass (v3.3.2)
// ----
// Scroll to the end to see the example
// Copyright (c) 2015-2016, salesforce.com, inc. All rights reserved.
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
// Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
@kaelig
kaelig / SassMeister-input.scss
Created January 16, 2016 00:38
Generated by SassMeister.com.
// ----
// libsass (v3.3.2)
// ----
$a: 1 !default;
$a: 2 !default;
test {
content: $a;
}
@kaelig
kaelig / SassMeister-input.scss
Created January 13, 2016 18:44
Generated by SassMeister.com.
// ----
// libsass (v3.3.2)
// ----
@charset "UTF-8"; // Fixes an issue where Ruby locale is not set properly
// See https://github.com/sass-mq/sass-mq/pull/10
/// Base font size on the `<body>` element
/// @type Number (unit)
$mq-base-font-size: 16px !default;
@kaelig
kaelig / SassMeister-input.scss
Created December 8, 2015 22:18
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
// Copyright (c) 2015, salesforce.com, inc. All rights reserved.
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
// Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
// Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
@kaelig
kaelig / SassMeister-input-HTML.html
Created December 8, 2015 21:46
Generated by SassMeister.com.
<div class="test@s">foobar</div>