Skip to content

Instantly share code, notes, and snippets.

View kevinberonilla's full-sized avatar

Kevin Beronilla kevinberonilla

View GitHub Profile
@kevinberonilla
kevinberonilla / gulpfile.js
Last active July 13, 2021 13:39
Gulp tasks for SFDX sandbox orgs
/*
Global Dependencies:
Gulp CLI
Project Dependencies:
Gulp (^4.0.0)
Gulp Sass
Gulp Beautify Code
Gulp Autoprefixer
Gulp Run
@kevinberonilla
kevinberonilla / component-width-calculation.js
Last active October 4, 2022 15:15
Component Width Script
/*
This solution only works if the component has one immediate child element, otherwise component.getElement()
does not return an HTML element and you won't be able to get the bounding rectangle.
*/
// Helper
setComponentWidth: function(component, helper) {
if (component.getElement() !== null && typeof(component.getElement().getBoundingClientRect) !== 'undefined') {
var componentWidth = Math.floor(component.getElement().getBoundingClientRect().width);
@kevinberonilla
kevinberonilla / gulpfile.js
Last active July 14, 2021 14:24
Gulp tasks for SFDX scratch orgs
/*
Global Dependencies:
Gulp CLI
Project Dependencies:
Gulp (^4.0.0)
Gulp Sass
Gulp Beautify Code
Gulp Autoprefixer
Gulp Run
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>ALJS Modal Input Example | Appiphony Lightning JS</title>
<link rel="stylesheet" type="text/css" href="assets/styles/salesforce-lightning-design-system.css">
</head>
<body>
@kevinberonilla
kevinberonilla / slds-textarea-bug.gist
Created March 28, 2016 19:21
SLDS 1.0.0 textarea bug
<!doctype html>
<html>
<head>
<meta name="robots" content="noindex, nofollow" />
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Textarea Bug</title>
<link rel="stylesheet" href="assets/styles/salesforce-lightning-design-system-vf.min.css" />
<link rel="stylesheet" href="css/main.min.css" />
@kevinberonilla
kevinberonilla / slds-brand-button-group.scss
Created January 12, 2016 15:13
.slds-button--brand support for .slds-button-group
.#{$css-prefix}button-group {
.#{$css-prefix}button {
&--brand {
border-color: white;
border: {
top-width: 0;
bottom-width: 0;
left-width: 1px
}
&:first-child {
@kevinberonilla
kevinberonilla / slds-icon-example-3.html
Last active November 23, 2015 17:10
A method for calling SLDS icons in Visualforce pages using a JS framework
<script>
var assetsLocation = '{!URLFOR($Resource.SLDS0120)}';
</script>
<use xlink:href="{{assetsLocation}}/assets/icons/standard-sprite/svg/symbols.svg#account"></use>
@kevinberonilla
kevinberonilla / slds-icon-example-2.html
Last active November 23, 2015 17:10
A method for calling SLDS icons in Visualforce pages
<use xlink:href="{!URLFOR($Resource.SLDS0120)}/assets/icons/standard-sprite/svg/symbols.svg#account"></use>
@kevinberonilla
kevinberonilla / slds-icon-example-1.html
Last active November 23, 2015 17:10
The default method for calling SLDS icons
<use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#account"></use>